Deprecated: urlencode(): Passing null to parameter #1 ($string) of type string is deprecated in /home/viratresidency/public_html/index.php(2) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 1
/*! * elFinder - file manager for web * Version 2.1.70 (2026-08-03) * http://elfinder.org * * Copyright 2009-2026, Studio 42 * Licensed under a 3-clauses BSD license */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD define(['jquery','jquery-ui'], factory); } else if (typeof exports !== 'undefined') { // CommonJS var $, ui; try { $ = require('jquery'); ui = require('jquery-ui'); } catch (e) {} module.exports = factory($, ui); } else { // Browser globals (Note: root is window) factory(root.jQuery, root.jQuery.ui, true); } }(this, function($, _ui, toGlobal) { toGlobal = toGlobal || false; /* * File: /js/elFinder.js */ /** * @class elFinder - file manager for web * * @author Dmitry (dio) Levashov **/ var elFinder = function(elm, opts, bootCallback) { //this.time('load'); var self = this, /** * Objects array of jQuery.Deferred that calls before elFinder boot up * * @type Array */ dfrdsBeforeBootup = [], /** * Plugin name to check for conflicts with bootstrap etc * * @type Array **/ conflictChecks = ['button', 'tooltip'], /** * Node on which elfinder creating * * @type jQuery **/ node = $(elm), /** * Object of events originally registered in this node * * @type Object */ prevEvents = $.extend(true, {}, $._data(node.get(0), 'events')), /** * Store node contents. * * @see this.destroy * @type jQuery **/ prevContent = $('
').append(node.contents()).attr('class', node.attr('class') || '').attr('style', node.attr('style') || ''), /** * Instance ID. Required to get/set cookie * * @type String **/ id = node.attr('id') || node.attr('id', 'elfauto' + $('.elfinder').length).attr('id'), /** * Events namespace * * @type String **/ namespace = 'elfinder-' + id, /** * Mousedown event * * @type String **/ mousedown = 'mousedown.'+namespace, /** * Keydown event * * @type String **/ keydown = 'keydown.'+namespace, /** * Keypress event * * @type String **/ keypress = 'keypress.'+namespace, /** * Keypup event * * @type String **/ keyup = 'keyup.'+namespace, /** * Is shortcuts/commands enabled * * @type Boolean **/ enabled = false, /** * Store enabled value before ajax request * * @type Boolean **/ prevEnabled = false, /** * List of build-in events which mapped into methods with same names * * @type Array **/ events = ['enable', 'disable', 'load', 'open', 'reload', 'select', 'add', 'remove', 'change', 'dblclick', 'getfile', 'lockfiles', 'unlockfiles', 'selectfiles', 'unselectfiles', 'dragstart', 'dragstop', 'search', 'searchend', 'viewchange'], /** * Rules to validate data from backend * * @type Object **/ rules = {}, /** * Current working directory hash * * @type String **/ cwd = '', /** * Current working directory options default * * @type Object **/ cwdOptionsDefault = { path : '', url : '', tmbUrl : '', disabled : [], separator : '/', archives : [], extract : [], copyOverwrite : true, uploadOverwrite : true, uploadMaxSize : 0, jpgQuality : 100, tmbCrop : false, tmbReqCustomData : false, tmb : false // old API }, /** * Current working directory options * * @type Object **/ cwdOptions = {}, /** * Files/dirs cache * * @type Object **/ files = {}, /** * Hidden Files/dirs cache * * @type Object **/ hiddenFiles = {}, /** * Files/dirs hash cache of each dirs * * @type Object **/ ownFiles = {}, /** * Selected files hashes * * @type Array **/ selected = [], /** * Events listeners * * @type Object **/ listeners = {}, /** * Shortcuts * * @type Object **/ shortcuts = {}, /** * Buffer for copied files * * @type Array **/ clipboard = [], /** * Copied/cuted files hashes * Prevent from remove its from cache. * Required for dispaly correct files names in error messages * * @type Object **/ remember = {}, /** * Queue for 'open' requests * * @type Array **/ queue = [], /** * Queue for only cwd requests e.g. `tmb` * * @type Array **/ cwdQueue = [], /** * Commands prototype * * @type Object **/ base = new self.command(self), /** * elFinder node width * * @type String * @default "auto" **/ width = 'auto', /** * elFinder node height * Number: pixcel or String: Number + "%" * * @type Number | String * @default 400 **/ height = 400, /** * Base node object or selector * Element which is the reference of the height percentage * * @type Object|String * @default null | $(window) (if height is percentage) **/ heightBase = null, /** * MIME type list(Associative array) handled as a text file * * @type Object|null */ textMimes = null, /** * elfinder path for sound played on remove * @type String * @default ./sounds/ **/ soundPath = 'sounds/', /** * JSON.stringify of previous fm.sorters * @type String */ prevSorterStr = '', /** * Map table of file extention to MIME-Type * @type Object */ extToMimeTable, /** * Disabled page unload function * @type Boolean */ diableUnloadCheck = false, beeper = $(document.createElement('audio')).hide().appendTo('body')[0], syncInterval, autoSyncStop = 0, uiCmdMapPrev = '', gcJobRes = null, open = function(data) { // NOTES: Do not touch data object var volumeid, contextmenu, emptyDirs = {}, stayDirs = {}, rmClass, hashes, calc, gc, collapsed, prevcwd, sorterStr, diff; if (self.api >= 2.1) { // support volume driver option `uiCmdMap` self.commandMap = (data.options.uiCmdMap && Object.keys(data.options.uiCmdMap).length)? data.options.uiCmdMap : {}; if (uiCmdMapPrev !== JSON.stringify(self.commandMap)) { uiCmdMapPrev = JSON.stringify(self.commandMap); } } else { self.options.sync = 0; } if (data.init) { // init - reset cache files = {}; ownFiles = {}; } else { // remove only files from prev cwd // and collapsed directory (included 100+ directories) to empty for perfomance tune in DnD prevcwd = cwd; rmClass = 'elfinder-subtree-loaded ' + self.res('class', 'navexpand'); collapsed = self.res('class', 'navcollapse'); hashes = Object.keys(files); calc = function(i) { if (!files[i]) { return true; } var isDir = (files[i].mime === 'directory'), phash = files[i].phash, pnav; if ( (!isDir || emptyDirs[phash] || (!stayDirs[phash] && self.navHash2Elm(files[i].hash).is(':hidden') && self.navHash2Elm(phash).next('.elfinder-navbar-subtree').children().length > 100 ) ) && (isDir || phash !== cwd) && ! remember[i] ) { if (isDir && !emptyDirs[phash]) { emptyDirs[phash] = true; self.navHash2Elm(phash) .removeClass(rmClass) .next('.elfinder-navbar-subtree').empty(); } deleteCache(files[i]); } else if (isDir) { stayDirs[phash] = true; } }; gc = function() { if (hashes.length) { gcJobRes && gcJobRes._abort(); gcJobRes = self.asyncJob(calc, hashes, { interval : 20, numPerOnce : 100 }).done(function() { var hd = self.storage('hide') || {items: {}}; if (Object.keys(hiddenFiles).length) { $.each(hiddenFiles, function(h) { if (!hd.items[h]) { delete hiddenFiles[h]; } }); } }); } }; self.trigger('filesgc').one('filesgc', function() { hashes = []; }); self.one('opendone', function() { if (prevcwd !== cwd) { if (! node.data('lazycnt')) { gc(); } else { self.one('lazydone', gc); } } }); } self.sorters = {}; cwd = data.cwd.hash; cache(data.files); if (!files[cwd]) { cache([data.cwd]); } else { diff = self.diff([data.cwd], true); if (diff.changed.length) { cache(diff.changed, 'change'); self.change({changed: diff.changed}); } } data.changed && data.changed.length && cache(data.changed, 'change'); // trigger event 'sorterupdate' sorterStr = JSON.stringify(self.sorters); if (prevSorterStr !== sorterStr) { self.trigger('sorterupdate'); prevSorterStr = sorterStr; } self.lastDir(cwd); self.autoSync(); }, /** * Store info about files/dirs in "files" object. * * @param Array files * @param String data type * @return void **/ cache = function(data, type) { var type = type || 'files', keeps = ['sizeInfo', 'encoding'], defsorter = { name: true, perm: true, date: true, size: true, kind: true }, sorterChk = !self.sorters._checked && (type === 'files'), l = data.length, setSorter = function(file) { var f = file || {}, sorters = []; $.each(self.sortRules, function(key) { if (defsorter[key] || typeof f[key] !== 'undefined' || (key === 'mode' && typeof f.perm !== 'undefined')) { sorters.push(key); } }); self.sorters = self.arrayFlip(sorters, true); self.sorters._checked = true; }, changedParents = {}, hideData = self.storage('hide') || {}, hides = hideData.items || {}, f, i, i1, keepProp, parents, hidden; for (i = 0; i < l; i++) { f = Object.assign({}, data[i]); hidden = (!hideData.show && hides[f.hash])? true : false; if (f.name && f.hash && f.mime) { if (!hidden) { if (sorterChk && f.phash === cwd) { setSorter(f); sorterChk = false; } if (f.phash && (type === 'add' || (type === 'change' && (!files[f.hash] || f.size !== files[f.hash])))) { if (parents = self.parents(f.phash)) { $.each(parents, function() { changedParents[this] = true; }); } } } if (files[f.hash]) { for (i1 =0; i1 < keeps.length; i1++) { if(files[f.hash][keeps[i1]] && ! f[keeps[i1]]) { f[keeps[i1]] = files[f.hash][keeps[i1]]; } } if (f.sizeInfo && !f.size) { f.size = f.sizeInfo.size; } deleteCache(files[f.hash], true); } if (hides[f.hash]) { hiddenFiles[f.hash] = f; } if (hidden) { l--; data.splice(i--, 1); } else { files[f.hash] = f; if (f.mime === 'directory' && !ownFiles[f.hash]) { ownFiles[f.hash] = {}; } if (f.phash) { if (!ownFiles[f.phash]) { ownFiles[f.phash] = {}; } ownFiles[f.phash][f.hash] = true; } } } } // delete sizeInfo cache $.each(Object.keys(changedParents), function() { var target = files[this]; if (target && target.sizeInfo) { delete target.sizeInfo; } }); // for empty folder sorterChk && setSorter(); }, /** * Delete file object from files caches * * @param Array removed hashes * @return void */ remove = function(removed) { var l = removed.length, roots = {}, rm = function(hash) { var file = files[hash], i; if (file) { if (file.mime === 'directory') { if (roots[hash]) { delete self.roots[roots[hash]]; } // restore stats of deleted root parent directory $.each(self.leafRoots, function(phash, roots) { var idx, pdir; if ((idx = $.inArray(hash, roots))!== -1) { if (roots.length === 1) { if ((pdir = Object.assign({}, files[phash])) && pdir._realStats) { $.each(pdir._realStats, function(k, v) { pdir[k] = v; }); remove(files[phash]._realStats); self.change({ changed: [pdir] }); } delete self.leafRoots[phash]; } else { self.leafRoots[phash].splice(idx, 1); } } }); if (self.searchStatus.state < 2) { $.each(files, function(h, f) { f.phash == hash && rm(h); }); } } if (file.phash) { if (parents = self.parents(file.phash)) { $.each(parents, function() { changedParents[this] = true; }); } } deleteCache(files[hash]); } }, changedParents = {}, parents; $.each(self.roots, function(k, v) { roots[v] = k; }); while (l--) { rm(removed[l]); } // delete sizeInfo cache $.each(Object.keys(changedParents), function() { var target = files[this]; if (target && target.sizeInfo) { delete target.sizeInfo; } }); }, /** * Update file object in files caches * * @param Array changed file objects * @return void * @deprecated should be use `cache(updatesArrayData, 'change');` */ change = function(changed) { $.each(changed, function(i, file) { var hash = file.hash; if (files[hash]) { $.each(Object.keys(files[hash]), function(i, v){ if (typeof file[v] === 'undefined') { delete files[hash][v]; } }); } files[hash] = files[hash] ? Object.assign(files[hash], file) : file; }); }, /** * Delete cache data of files, ownFiles and self.optionsByHashes * * @param Object file * @param Boolean update * @return void */ deleteCache = function(file, update) { var hash = file.hash, phash = file.phash; if (phash && ownFiles[phash]) { delete ownFiles[phash][hash]; } if (!update) { ownFiles[hash] && delete ownFiles[hash]; self.optionsByHashes[hash] && delete self.optionsByHashes[hash]; } delete files[hash]; }, /** * Maximum number of concurrent connections on request * * @type Number */ requestMaxConn, /** * Current number of connections * * @type Number */ requestCnt = 0, /** * Queue waiting for connection * * @type Array */ requestQueue = [], /** * Current open command instance * * @type Object */ currentOpenCmd = null, /** * Current CSRF refresh request instance * * @type Object */ currentCsrfRefresh = null, /** * Exec shortcut * * @param jQuery.Event keydown/keypress event * @return void */ execShortcut = function(e) { var code = e.keyCode, ctrlKey = !!(e.ctrlKey || e.metaKey), isMousedown = e.type === 'mousedown', ddm; !isMousedown && (self.keyState.keyCode = code); self.keyState.ctrlKey = ctrlKey; self.keyState.shiftKey = e.shiftKey; self.keyState.metaKey = e.metaKey; self.keyState.altKey = e.altKey; if (isMousedown) { return; } else if (e.type === 'keyup') { self.keyState.keyCode = null; return; } if (enabled) { $.each(shortcuts, function(i, shortcut) { if (shortcut.type == e.type && shortcut.keyCode == code && shortcut.shiftKey == e.shiftKey && shortcut.ctrlKey == ctrlKey && shortcut.altKey == e.altKey) { e.preventDefault(); e.stopPropagation(); shortcut.callback(e, self); self.debug('shortcut-exec', i+' : '+shortcut.description); } }); // prevent tab out of elfinder if (code == $.ui.keyCode.TAB && !$(e.target).is(':input')) { e.preventDefault(); } // cancel any actions by [Esc] key if (e.type === 'keydown' && code == $.ui.keyCode.ESCAPE) { // copy or cut if (! node.find('.ui-widget:visible').length) { self.clipboard().length && self.clipboard([]); } // dragging if ($.ui.ddmanager) { ddm = $.ui.ddmanager.current; ddm && ddm.helper && ddm.cancel(); } // button menus self.toHide(node.find('.ui-widget.elfinder-button-menu.elfinder-frontmost:visible')); // trigger keydownEsc self.trigger('keydownEsc', e); } } }, date = new Date(), utc, i18n, inFrame = (window.parent !== window), parentIframe = (function() { var pifm, ifms; if (inFrame) { try { ifms = $('iframe', window.parent.document); if (ifms.length) { $.each(ifms, function(i, ifm) { if (ifm.contentWindow === window) { pifm = $(ifm); return false; } }); } } catch(e) {} } return pifm; })(), /** * elFinder boot up function * * @type Function */ bootUp, /** * Original function of XMLHttpRequest.prototype.send * * @type Function */ savedXhrSend; // opts must be an object if (!opts) { opts = {}; } // set UA.Angle, UA.Rotated for mobile devices if (self.UA.Mobile) { $(window).on('orientationchange.'+namespace, function() { var a = ((screen && screen.orientation && screen.orientation.angle) || window.orientation || 0) + 0; if (a === -90) { a = 270; } self.UA.Angle = a; self.UA.Rotated = a % 180 === 0? false : true; }).trigger('orientationchange.'+namespace); } // check opt.bootCallback if (opts.bootCallback && typeof opts.bootCallback === 'function') { (function() { var func = bootCallback, opFunc = opts.bootCallback; bootCallback = function(fm, extraObj) { func && typeof func === 'function' && func.call(this, fm, extraObj); opFunc.call(this, fm, extraObj); }; })(); } delete opts.bootCallback; /** * Protocol version * * @type String **/ this.api = null; /** * elFinder use new api * * @type Boolean **/ this.newAPI = false; /** * elFinder use old api * * @type Boolean **/ this.oldAPI = false; /** * Net drivers names * * @type Array **/ this.netDrivers = []; /** * Base URL of elfFinder library starting from Manager HTML * * @type String */ this.baseUrl = ''; /** * Base URL of i18n js files * baseUrl + "js/i18n/" when empty value * * @type String */ this.i18nBaseUrl = ''; /** * Base URL of worker js files * baseUrl + "js/worker/" when empty value * * @type String */ this.workerBaseUrl = ''; /** * Is elFinder CSS loaded * * @type Boolean */ this.cssloaded = false; /** * Current theme object * * @type Object|Null */ this.theme = null; this.mimesCanMakeEmpty = {}; /** * Callback function at boot up that option specified at elFinder starting * * @type Function */ this.bootCallback; /** * Callback function at reload(restart) elFinder * * @type Function */ this.reloadCallback; /** * ID. Required to create unique cookie name * * @type String **/ this.id = id; /** * Method to store/fetch data * * @type Function **/ this.storage = (function() { try { if ('localStorage' in window && window.localStorage !== null) { if (self.UA.Safari) { // check for Mac/iOS safari private browsing mode window.localStorage.setItem('elfstoragecheck', 1); window.localStorage.removeItem('elfstoragecheck'); } return self.localStorage; } else { return self.cookie; } } catch (e) { return self.cookie; } })(); /** * Set pause page unload check function or Get state * * @param Boolean state To set state * @param Boolean keep Keep disabled * @return Boolean|void */ this.pauseUnloadCheck = function(state, keep) { if (typeof state === 'undefined') { return diableUnloadCheck; } else { diableUnloadCheck = !!state; if (state && !keep) { requestAnimationFrame(function() { diableUnloadCheck = false; }); } } }; /** * Configuration options * * @type Object **/ //this.options = $.extend(true, {}, this._options, opts); this.options = Object.assign({}, this._options); // for old type configuration if (opts.uiOptions) { if (opts.uiOptions.toolbar && Array.isArray(opts.uiOptions.toolbar)) { if ($.isPlainObject(opts.uiOptions.toolbar[opts.uiOptions.toolbar.length - 1])) { self.options.uiOptions.toolbarExtra = Object.assign(self.options.uiOptions.toolbarExtra || {}, opts.uiOptions.toolbar.pop()); } } } // Overwrite if opts value is an array (function() { var arrOv = function(obj, base) { if ($.isPlainObject(obj)) { $.each(obj, function(k, v) { if ($.isPlainObject(v)) { if (!base[k]) { base[k] = {}; } arrOv(v, base[k]); } else { base[k] = v; } }); } }; arrOv(opts, self.options); })(); // join toolbarExtra to toolbar this.options.uiOptions.toolbar.push(this.options.uiOptions.toolbarExtra); delete this.options.uiOptions.toolbarExtra; /** * Arrays that has to unbind events * * @type Object */ this.toUnbindEvents = {}; /** * Attach listener to events * To bind to multiply events at once, separate events names by space * * @param String event(s) name(s) * @param Object event handler or {done: handler} * @param Boolean priority first * @return elFinder */ this.bind = function(event, callback, priorityFirst) { var i, len; if (callback && (typeof callback === 'function' || typeof callback.done === 'function')) { event = ('' + event).toLowerCase().replace(/^\s+|\s+$/g, '').split(/\s+/); len = event.length; for (i = 0; i < len; i++) { if (listeners[event[i]] === void(0)) { listeners[event[i]] = []; } listeners[event[i]][priorityFirst? 'unshift' : 'push'](callback); } } return this; }; /** * Remove event listener if exists * To un-bind to multiply events at once, separate events names by space * * @param String event(s) name(s) * @param Function callback * @return elFinder */ this.unbind = function(event, callback) { var i, len, l, ci; event = ('' + event).toLowerCase().split(/\s+/); len = event.length; for (i = 0; i < len; i++) { if (l = listeners[event[i]]) { ci = $.inArray(callback, l); ci > -1 && l.splice(ci, 1); } } callback = null; return this; }; /** * Fire event - send notification to all event listeners * In the callback `this` becames an event object * * @param String event type * @param Object data to send across event * @param Boolean allow modify data (call by reference of data) default: true * @return elFinder */ this.trigger = function(evType, data, allowModify) { var type = evType.toLowerCase(), isopen = (type === 'open'), dataIsObj = (typeof data === 'object'), handlers = listeners[type] || [], dones = [], i, l, jst, event; this.debug('event-'+type, data); if (! dataIsObj || typeof allowModify === 'undefined') { allowModify = true; } if (l = handlers.length) { event = $.Event(type); if (data) { data._getEvent = function() { return event; }; } if (allowModify) { event.data = data; } for (i = 0; i < l; i++) { if (! handlers[i]) { // probably un-binded this handler continue; } // handler is $.Deferred(), call all functions upon completion if (handlers[i].done) { dones.push(handlers[i].done); continue; } // set `event.data` only callback has argument if (handlers[i].length) { if (!allowModify) { // to avoid data modifications. remember about "sharing" passing arguments in js :) if (typeof jst === 'undefined') { try { jst = JSON.stringify(data); } catch(e) { jst = false; } } event.data = jst? JSON.parse(jst) : data; } } try { if (handlers[i].call(event, event, this) === false || event.isDefaultPrevented()) { this.debug('event-stoped', event.type); break; } } catch (ex) { window.console && window.console.log && window.console.log(ex); } } // call done functions if (l = dones.length) { for (i = 0; i < l; i++) { try { if (dones[i].call(event, event, this) === false || event.isDefaultPrevented()) { this.debug('event-stoped', event.type + '(done)'); break; } } catch (ex) { window.console && window.console.log && window.console.log(ex); } } } if (this.toUnbindEvents[type] && this.toUnbindEvents[type].length) { $.each(this.toUnbindEvents[type], function(i, v) { self.unbind(v.type, v.callback); }); delete this.toUnbindEvents[type]; } } return this; }; /** * Get event listeners * * @param String event type * @return Array listed event functions */ this.getListeners = function(event) { return event? listeners[event.toLowerCase()] : listeners; }; // set fm.baseUrl this.baseUrl = (function() { var myTag, base, baseUrl; if (self.options.baseUrl) { return self.options.baseUrl; } else { baseUrl = ''; myTag = null; $('head > script').each(function() { if (this.src && this.src.match(/js\/elfinder(?:-[a-z0-9_-]+)?\.(?:min|full)\.js(?:$|\?)/i)) { myTag = $(this); return false; } }); if (myTag) { baseUrl = myTag.attr('src').replace(/js\/[^\/]+$/, ''); if (! baseUrl.match(/^(https?\/\/|\/)/)) { // check tag if (base = $('head > base[href]').attr('href')) { baseUrl = base.replace(/\/$/, '') + '/' + baseUrl; } } } if (baseUrl !== '') { self.options.baseUrl = baseUrl; } else { if (! self.options.baseUrl) { self.options.baseUrl = './'; } baseUrl = self.options.baseUrl; } return baseUrl; } })(); this.i18nBaseUrl = (this.options.i18nBaseUrl || this.baseUrl + 'js/i18n').replace(/\/$/, '') + '/'; this.workerBaseUrl = (this.options.workerBaseUrl || this.baseUrl + 'js/worker').replace(/\/$/, '') + '/'; this.options.maxErrorDialogs = Math.max(1, parseInt(this.options.maxErrorDialogs || 5)); // set dispInlineRegex cwdOptionsDefault.dispInlineRegex = this.options.dispInlineRegex; // auto load required CSS if (this.options.cssAutoLoad) { (function() { var baseUrl = self.baseUrl, myCss = $('head > link[href$="css/elfinder.min.css"],link[href$="css/elfinder.full.css"]:first').length, rmTag = function() { if (node.data('cssautoloadHide')) { node.data('cssautoloadHide').remove(); node.removeData('cssautoloadHide'); } }, loaded = function() { if (!self.cssloaded) { rmTag(); self.cssloaded = true; self.trigger('cssloaded'); } }; if (! myCss) { // to request CSS auto loading self.cssloaded = null; } // additional CSS files if (Array.isArray(self.options.cssAutoLoad)) { if (!self.options.themes.default) { // set as default theme self.options.themes = Object.assign({ 'default' : { 'name': 'default', 'cssurls': self.options.cssAutoLoad } }, self.options.themes); if (!self.options.theme) { self.options.theme = 'default'; } } else { if (self.cssloaded === true) { self.loadCss(self.options.cssAutoLoad); } else { self.bind('cssloaded', function() { self.loadCss(self.options.cssAutoLoad); }); } } } // try to load main css if (self.cssloaded === null) { // hide elFinder node while css loading node.addClass('elfinder') .data('cssautoloadHide', $('')); $('head').append(node.data('cssautoloadHide')); // set default theme if (!self.options.themes.default) { self.options.themes = Object.assign({ 'default' : { 'name': 'default', 'cssurls': 'css/theme.css', 'author': 'elFinder Project', 'license': '3-clauses BSD' } }, self.options.themes); if (!self.options.theme) { self.options.theme = 'default'; } } // Delay 'visibility' check it required for browsers such as Safari requestAnimationFrame(function() { if (node.css('visibility') === 'hidden') { // load CSS self.loadCss([baseUrl+'css/elfinder.min.css'], { dfd: $.Deferred().done(function() { loaded(); }).fail(function() { rmTag(); if (!self.cssloaded) { self.cssloaded = false; self.bind('init', function() { if (!self.cssloaded) { self.error(['errRead', 'CSS (elfinder.min)']); } }); } }) }); } else { loaded(); } }); } })(); } // load theme if exists (function() { var theme, themes = self.options.themes, ids = Object.keys(themes || {}); if (ids.length) { theme = self.storage('theme') || self.options.theme; if (!themes[theme]) { theme = ids[0]; } if (self.cssloaded) { self.changeTheme(theme); } else { self.bind('cssloaded', function() { self.changeTheme(theme); }); } } })(); /** * Volume option to set the properties of the root Stat * * @type Object */ this.optionProperties = { icon: void(0), csscls: void(0), tmbUrl: void(0), uiCmdMap: {}, netkey: void(0), disabled: [] }; if (! inFrame && ! this.options.enableAlways && $('body').children().length === 2) { // only node and beeper this.options.enableAlways = true; } // make options.debug if (this.options.debug === true) { this.options.debug = 'all'; } else if (Array.isArray(this.options.debug)) { (function() { var d = {}; $.each(self.options.debug, function() { d[this] = true; }); self.options.debug = d; })(); } else { this.options.debug = false; } /** * Original functions evacuated by conflict check * * @type Object */ this.noConflicts = {}; /** * Check and save conflicts with bootstrap etc * * @type Function */ this.noConflict = function() { $.each(conflictChecks, function(i, p) { if ($.fn[p] && typeof $.fn[p].noConflict === 'function') { self.noConflicts[p] = $.fn[p].noConflict(); } }); }; // do check conflict this.noConflict(); /** * Is elFinder over CORS * * @type Boolean **/ this.isCORS = false; // configure for CORS (function(){ if (typeof self.options.cors !== 'undefined' && self.options.cors !== null) { self.isCORS = self.options.cors? true : false; } else { var parseUrl = document.createElement('a'), parseUploadUrl, selfProtocol = window.location.protocol, portReg = function(protocol) { protocol = (!protocol || protocol === ':')? selfProtocol : protocol; return protocol === 'https:'? /\:443$/ : /\:80$/; }, selfHost = window.location.host.replace(portReg(selfProtocol), ''); parseUrl.href = opts.url; if (opts.urlUpload && (opts.urlUpload !== opts.url)) { parseUploadUrl = document.createElement('a'); parseUploadUrl.href = opts.urlUpload; } if (selfHost !== parseUrl.host.replace(portReg(parseUrl.protocol), '') || (parseUrl.protocol !== ':'&& parseUrl.protocol !== '' && (selfProtocol !== parseUrl.protocol)) || (parseUploadUrl && (selfHost !== parseUploadUrl.host.replace(portReg(parseUploadUrl.protocol), '') || (parseUploadUrl.protocol !== ':' && parseUploadUrl.protocol !== '' && (selfProtocol !== parseUploadUrl.protocol)) ) ) ) { self.isCORS = true; } } if (self.isCORS) { if (!$.isPlainObject(self.options.customHeaders)) { self.options.customHeaders = {}; } if (!$.isPlainObject(self.options.xhrFields)) { self.options.xhrFields = {}; } self.options.requestType = 'post'; self.options.customHeaders['X-Requested-With'] = 'XMLHttpRequest'; self.options.xhrFields['withCredentials'] = true; } })(); /** * Ajax request type * * @type String * @default "get" **/ this.requestType = /^(get|post)$/i.test(this.options.requestType) ? this.options.requestType.toLowerCase() : 'get'; // set `requestMaxConn` by option requestMaxConn = Math.max(parseInt(this.options.requestMaxConn), 1); /** * Custom data that given as options * * @type Object * @default {} */ this.optsCustomData = $.isPlainObject(this.options.customData) ? this.options.customData : {}; /** * Any data to send across every ajax request * * @type Object * @default {} **/ this.customData = Object.assign({}, this.optsCustomData); /** * Previous custom data from connector * * @type Object|null */ this.prevCustomData = null; /** * Any custom headers to send across every ajax request * * @type Object * @default {} */ this.customHeaders = $.isPlainObject(this.options.customHeaders) ? this.options.customHeaders : {}; /** * CSRF header name for connector requests * * @type String */ this.csrfHeaderName = 'X-elFinder-CSRF'; /** * JSON response key for CSRF token * * @type String */ this.csrfResponseKey = 'csrf'; /** * JSON response key that marks a CSRF-triggered reload request * * @type String */ this.csrfReloadKey = 'csrfReload'; /** * Store or clear current CSRF token header * * @param {String} token * @return void */ this.setCsrfToken = function(token) { if (typeof token === 'string' && token) { self.customHeaders[self.csrfHeaderName] = token; } else { delete self.customHeaders[self.csrfHeaderName]; } }; /** * Determine whether the response represents a CSRF refreshable failure * * @param {Object} xhr * @param {Object} response * @return {Boolean} */ this.isCsrfReloadResponse = function(xhr, response) { return !!(xhr && xhr.status === 403 && !xhr._csrfRefresh && response && response[self.csrfReloadKey]); }; /** * Refresh CSRF token via open&init=1 without replaying the failed command * * @return {jQuery.Deferred} */ this.refreshCsrfToken = function() { var cwdFile = self.cwd(), target = (cwdFile && cwdFile.hash) || self.lastDir('') || self.startDir(); if (currentCsrfRefresh && currentCsrfRefresh.state() === 'pending') { return currentCsrfRefresh; } currentCsrfRefresh = self.request({ data : {cmd : 'open', target : target, init : 1, tree : 1}, preventDefault : true, preventFail : true, _csrfRefresh : true }).always(function() { currentCsrfRefresh = null; }); return currentCsrfRefresh; }; /** * Start background CSRF refresh if current failure is refreshable * * @param {Object} xhr * @param {Object} response * @return {Boolean} */ this.handleCsrfReload = function(xhr, response) { if (!self.isCsrfReloadResponse(xhr, response)) { return false; } self.refreshCsrfToken(); return true; }; /** * Any custom xhrFields to send across every ajax request * * @type Object * @default {} */ this.xhrFields = $.isPlainObject(this.options.xhrFields) ? this.options.xhrFields : {}; /** * Replace XMLHttpRequest.prototype.send to extended function for 3rd party libs XHR request etc. * * @type Function */ this.replaceXhrSend = function() { if (! savedXhrSend) { savedXhrSend = XMLHttpRequest.prototype.send; } XMLHttpRequest.prototype.send = function() { var xhr = this; // set request headers if (self.customHeaders) { $.each(self.customHeaders, function(key) { xhr.setRequestHeader(key, this); }); } // set xhrFields if (self.xhrFields) { $.each(self.xhrFields, function(key) { if (key in xhr) { xhr[key] = this; } }); } return savedXhrSend.apply(this, arguments); }; }; /** * Restore saved original XMLHttpRequest.prototype.send * * @type Function */ this.restoreXhrSend = function() { savedXhrSend && (XMLHttpRequest.prototype.send = savedXhrSend); }; /** * command names for into queue for only cwd requests * these commands aborts before `open` request * * @type Array * @default ['tmb', 'parents'] */ this.abortCmdsOnOpen = this.options.abortCmdsOnOpen || ['tmb', 'parents']; /** * ui.nav id prefix * * @type String */ this.navPrefix = 'nav' + (elFinder.prototype.uniqueid? elFinder.prototype.uniqueid : '') + '-'; /** * ui.cwd id prefix * * @type String */ this.cwdPrefix = elFinder.prototype.uniqueid? ('cwd' + elFinder.prototype.uniqueid + '-') : ''; // Increment elFinder.prototype.uniqueid ++elFinder.prototype.uniqueid; /** * URL to upload files * * @type String **/ this.uploadURL = opts.urlUpload || opts.url; /** * Events namespace * * @type String **/ this.namespace = namespace; /** * Today timestamp * * @type Number **/ this.today = (new Date(date.getFullYear(), date.getMonth(), date.getDate())).getTime()/1000; /** * Yesterday timestamp * * @type Number **/ this.yesterday = this.today - 86400; utc = this.options.UTCDate ? 'UTC' : ''; this.getHours = 'get'+utc+'Hours'; this.getMinutes = 'get'+utc+'Minutes'; this.getSeconds = 'get'+utc+'Seconds'; this.getDate = 'get'+utc+'Date'; this.getDay = 'get'+utc+'Day'; this.getMonth = 'get'+utc+'Month'; this.getFullYear = 'get'+utc+'FullYear'; /** * elFinder node z-index (auto detect on elFinder load) * * @type null | Number **/ this.zIndex; /** * Current search status * * @type Object */ this.searchStatus = { state : 0, // 0: search ended, 1: search started, 2: in search result query : '', target : '', mime : '', mixed : false, // in multi volumes search: false or Array that target volume ids ininc : false // in incremental search }; /** * Interface language * * @type String * @default "en" **/ this.lang = this.storage('lang') || this.options.lang; if (this.lang === 'jp') { this.lang = this.options.lang = 'ja'; } this.viewType = this.storage('view') || this.options.defaultView || 'icons'; this.sortType = this.storage('sortType') || this.options.sortType || 'name'; this.sortOrder = this.storage('sortOrder') || this.options.sortOrder || 'asc'; this.sortStickFolders = this.storage('sortStickFolders'); if (this.sortStickFolders === null) { this.sortStickFolders = !!this.options.sortStickFolders; } else { this.sortStickFolders = !!this.sortStickFolders; } this.sortAlsoTreeview = this.storage('sortAlsoTreeview'); if (this.sortAlsoTreeview === null || this.options.sortAlsoTreeview === null) { this.sortAlsoTreeview = !!this.options.sortAlsoTreeview; } else { this.sortAlsoTreeview = !!this.sortAlsoTreeview; } this.sortRules = $.extend(true, {}, this._sortRules, this.options.sortRules); $.each(this.sortRules, function(name, method) { if (typeof method != 'function') { delete self.sortRules[name]; } }); this.compare = this.compare.bind(this); /** * Delay in ms before open notification dialog * * @type Number * @default 500 **/ this.notifyDelay = this.options.notifyDelay > 0 ? parseInt(this.options.notifyDelay) : 500; /** * Dragging UI Helper object * * @type jQuery | null **/ this.draggingUiHelper = null; /** * Base droppable options * * @type Object **/ this.droppable = { greedy : true, tolerance : 'pointer', accept : '.elfinder-cwd-file-wrapper,.elfinder-navbar-dir,.elfinder-cwd-file,.elfinder-cwd-filename', hoverClass : this.res('class', 'adroppable'), classes : { // Deprecated hoverClass jQueryUI>=1.12.0 'ui-droppable-hover': this.res('class', 'adroppable') }, autoDisable: true, // elFinder original, see jquery.elfinder.js drop : function(e, ui) { var dst = $(this), targets = $.grep(ui.helper.data('files')||[], function(h) { return h? true : false; }), result = [], dups = [], faults = [], isCopy = ui.helper.hasClass('elfinder-drag-helper-plus'), c = 'class', cnt, hash, i, h; if (typeof e.button === 'undefined' || ui.helper.data('namespace') !== namespace || ! self.insideWorkzone(e.pageX, e.pageY)) { return false; } if (dst.hasClass(self.res(c, 'cwdfile'))) { hash = self.cwdId2Hash(dst.attr('id')); } else if (dst.hasClass(self.res(c, 'navdir'))) { hash = self.navId2Hash(dst.attr('id')); } else { hash = cwd; } cnt = targets.length; while (cnt--) { h = targets[cnt]; // ignore drop into itself or in own location if (h != hash && files[h].phash != hash) { result.push(h); } else { ((isCopy && h !== hash && files[hash].write)? dups : faults).push(h); } } if (faults.length) { return false; } ui.helper.data('droped', true); if (dups.length) { ui.helper.hide(); self.exec('duplicate', dups, {_userAction: true}); } if (result.length) { ui.helper.hide(); self.clipboard(result, !isCopy); self.exec('paste', hash, {_userAction: true}, hash).always(function(){ self.clipboard([]); self.trigger('unlockfiles', {files : targets}); }); self.trigger('drop', {files : targets}); } } }; /** * Return true if filemanager is active * * @return Boolean **/ this.enabled = function() { return enabled && this.visible(); }; /** * Return true if filemanager is visible * * @return Boolean **/ this.visible = function() { return node[0].elfinder && node.is(':visible'); }; /** * Return file is root? * * @param Object target file object * @return Boolean */ this.isRoot = function(file) { return (file.isroot || ! file.phash)? true : false; }; /** * Return root dir hash for current working directory * * @param String target hash * @param Boolean include fake parent (optional) * @return String */ this.root = function(hash, fake) { hash = hash || cwd; var dir, i; if (! fake) { $.each(self.roots, function(id, rhash) { if (hash.indexOf(id) === 0) { dir = rhash; return false; } }); if (dir) { return dir; } } dir = files[hash]; while (dir && dir.phash && (fake || ! dir.isroot)) { dir = files[dir.phash]; } if (dir) { return dir.hash; } while (i in files && files.hasOwnProperty(i)) { dir = files[i]; if (dir.mime === 'directory' && !dir.phash && dir.read) { return dir.hash; } } return ''; }; /** * Return current working directory info * * @return Object */ this.cwd = function() { return files[cwd] || {}; }; /** * Return required cwd option * * @param String option name * @param String target hash (optional) * @return mixed */ this.option = function(name, target) { var res, item; target = target || cwd; if (self.optionsByHashes[target] && typeof self.optionsByHashes[target][name] !== 'undefined') { return self.optionsByHashes[target][name]; } if (self.hasVolOptions && cwd !== target && (!(item = self.file(target)) || item.phash !== cwd)) { res = ''; $.each(self.volOptions, function(id, opt) { if (target.indexOf(id) === 0) { res = opt[name] || ''; return false; } }); return res; } else { return cwdOptions[name] || ''; } }; /** * Return disabled commands by each folder * * @param Array target hashes * @return Array */ this.getDisabledCmds = function(targets, flip) { var disabled = {'hidden': true}; if (! Array.isArray(targets)) { targets = [ targets ]; } $.each(targets, function(i, h) { var disCmds = self.option('disabledFlip', h); if (disCmds) { Object.assign(disabled, disCmds); } }); return flip? disabled : Object.keys(disabled); }; /** * Return file data from current dir or tree by it's hash * * @param String file hash * @return Object */ this.file = function(hash, alsoHidden) { return hash? (files[hash] || (alsoHidden? hiddenFiles[hash] : void(0))) : void(0); }; /** * Return all cached files * * @param String parent hash * @return Object */ this.files = function(phash) { var items = {}; if (phash) { if (!ownFiles[phash]) { return {}; } $.each(ownFiles[phash], function(h) { if (files[h]) { items[h] = files[h]; } else { delete ownFiles[phash][h]; } }); return Object.assign({}, items); } return Object.assign({}, files); }; /** * Return list of file parents hashes include file hash * * @param String file hash * @return Array */ this.parents = function(hash) { var parents = [], dir; while (hash && (dir = this.file(hash))) { parents.unshift(dir.hash); hash = dir.phash; } return parents; }; this.path2array = function(hash, i18) { var file, path = []; while (hash) { if ((file = files[hash]) && file.hash) { path.unshift(i18 && file.i18 ? file.i18 : file.name); hash = file.isroot? null : file.phash; } else { path = []; break; } } return path; }; /** * Return file path or Get path async with jQuery.Deferred * * @param Object file * @param Boolean i18 * @param Object asyncOpt * @return String|jQuery.Deferred */ this.path = function(hash, i18, asyncOpt) { var path = files[hash] && files[hash].path ? files[hash].path : this.path2array(hash, i18).join(cwdOptions.separator); if (! asyncOpt || ! files[hash]) { return path; } else { asyncOpt = Object.assign({notify: {type : 'parents', cnt : 1, hideCnt : true}}, asyncOpt); var dfd = $.Deferred(), notify = asyncOpt.notify, noreq = false, req = function() { self.request({ data : {cmd : 'parents', target : files[hash].phash}, notify : notify, preventFail : true }) .done(done) .fail(function() { dfd.reject(); }); }, done = function() { self.one('parentsdone', function() { path = self.path(hash, i18); if (path === '' && noreq) { //retry with request noreq = false; req(); } else { if (notify) { clearTimeout(ntftm); notify.cnt = -(parseInt(notify.cnt || 0)); self.notify(notify); } dfd.resolve(path); } }); }, ntftm; if (path) { return dfd.resolve(path); } else { if (self.ui['tree']) { // try as no request if (notify) { ntftm = setTimeout(function() { self.notify(notify); }, self.notifyDelay); } noreq = true; done(true); } else { req(); } return dfd; } } }; /** * Return file url if set * * @param String file hash * @param Object Options * @return String|Object of jQuery Deferred */ this.url = function(hash, o) { var file = files[hash], opts = o || {}, async = opts.async || false, temp = opts.temporary || false, onetm = (opts.onetime && self.option('onetimeUrl', hash)) || false, absurl = opts.absurl || false, dfrd = (async || onetm)? $.Deferred() : null, filter = function(url) { if (url && absurl) { url = self.convAbsUrl(url); } return url; }, getUrl = function(url) { if (url) { return filter(url); } if (file.url) { return filter(file.url); } if (typeof baseUrl === 'undefined') { baseUrl = getBaseUrl(); } if (baseUrl) { return filter(baseUrl + $.map(self.path2array(hash), function(n) { return encodeURIComponent(n); }).slice(1).join('/')); } var params = Object.assign({}, self.customData, { cmd: 'file', target: file.hash }); if (self.oldAPI) { params.cmd = 'open'; params.current = file.phash; } return filter(self.options.url + (self.options.url.indexOf('?') === -1 ? '?' : '&') + $.param(params, true)); }, getBaseUrl = function() { return self.option('url', (!self.isRoot(file) && file.phash) || file.hash); }, baseUrl, res; if (!file || !file.read) { return async? dfrd.resolve('') : ''; } if (onetm && (!file.url || file.url == '1') && !(baseUrl = getBaseUrl())) { async = true; this.request({ data : { cmd : 'url', target : hash, options : { onetime: 1 } }, preventDefault : true, options: {async: async}, notify: {type : 'file', cnt : 1, hideCnt : true}, progressBar: opts.progressBar }).done(function(data) { dfrd.resolve(filter(data.url || '')); }).fail(function() { dfrd.resolve(''); }); } else { if (file.url == '1' || (temp && !file.url && !(baseUrl = getBaseUrl()))) { this.request({ data : { cmd : 'url', target : hash, options : { temporary: temp? 1 : 0 } }, preventDefault : true, options: {async: async}, notify: async? {type : temp? 'file' : 'url', cnt : 1, hideCnt : true} : {}, progressBar: opts.progressBar }) .done(function(data) { file.url = data.url || ''; }) .fail(function() { file.url = ''; }) .always(function() { var url; if (file.url && temp) { url = file.url; file.url = '1'; // restore } if (async) { dfrd.resolve(getUrl(url)); } else { return getUrl(url); } }); } else { if (async) { dfrd.resolve(getUrl()); } else { return getUrl(); } } } if (async) { return dfrd; } }; /** * Return file url for the extarnal service * * @param String hash The hash * @param Object options The options * @return Object jQuery Deferred */ this.forExternalUrl = function(hash, options) { var onetime = self.option('onetimeUrl', hash), opts = { async: true, absurl: true }; opts[onetime? 'onetime' : 'temporary'] = true; return self.url(hash, Object.assign({}, options, opts)); }; /** * Return file url for open in elFinder * * @param String file hash * @param Boolean for download link * @param Object requestOpts The request options * @return String */ this.openUrl = function(hash, download, callback, requestOpts) { var file = files[hash], url = '', onetimeSize = (requestOpts || {}).onetimeSize || (5 * 1024 * 1024); if (!file || !file.read) { return ''; } if (!download || download === 'sameorigin') { if (file.url) { if (file.url != 1) { url = file.url; } } else if (cwdOptions.url && file.hash.indexOf(self.cwd().volumeid) === 0) { url = cwdOptions.url + $.map(this.path2array(hash), function(n) { return encodeURIComponent(n); }).slice(1).join('/'); } if (!download || this.isSameOrigin(url)) { if (url) { url += (url.match(/\?/)? '&' : '?') + '_'.repeat((url.match(/[\?&](_+)t=/g) || ['&t=']).sort().shift().match(/[\?&](_*)t=/)[1].length + 1) + 't=' + (file.ts || parseInt(+new Date()/1000)); if (callback) { callback(url); return; } else { return url; } } } } if (callback && this.hasParrotHeaders()) { if (!requestOpts) { requestOpts = {}; } else { delete requestOpts.onetimeSize; } if (!requestOpts.onetime && !requestOpts.temporary && file.size > onetimeSize) { if (file.mime.match(/^video|audio/)) { requestOpts.temporary = true; } else { requestOpts.onetime = true; } } if (requestOpts.onetime || requestOpts.temporary) { return this.url(file.hash, Object.assign({ async: true }, requestOpts)).done(function(url) { callback(url); }).fail(function() { callback(''); }); } else { return this.getContents(hash, 'blob', requestOpts).done(function(blob){ url = (window.URL || window.webkitURL).createObjectURL(blob); callback(url); }).fail(function() { callback(''); }); } } else { url = this.options.url; url = url + (url.indexOf('?') === -1 ? '?' : '&') + (this.oldAPI ? 'cmd=open¤t='+file.phash : 'cmd=file') + '&target=' + file.hash + '&_t=' + (file.ts || parseInt(+new Date()/1000)); if (download === true) { url += '&download=1'; } $.each(this.customData, function(key, val) { url += '&' + encodeURIComponent(key) + '=' + encodeURIComponent(val); }); if (callback) { callback(url); return; } else { return url; } } }; /** * Return thumbnail url * * @param Object file object * @return String */ this.tmb = function(file) { var tmbUrl, tmbCrop, cls = 'elfinder-cwd-bgurl', url = '', cData = {}, n = 0; if ($.isPlainObject(file)) { if (self.searchStatus.state && file.hash.indexOf(self.cwd().volumeid) !== 0) { tmbUrl = self.option('tmbUrl', file.hash); tmbCrop = self.option('tmbCrop', file.hash); } else { tmbUrl = cwdOptions.tmbUrl; tmbCrop = cwdOptions.tmbCrop; } if (tmbCrop) { cls += ' elfinder-cwd-bgurl-crop'; } if (tmbUrl === 'self' && file.mime.indexOf('image/') === 0) { url = self.openUrl(file.hash); cls += ' elfinder-cwd-bgself'; } else if ((self.oldAPI || tmbUrl) && file && file.tmb && file.tmb != 1) { url = tmbUrl + file.tmb; } else if (self.newAPI && file && file.tmb && file.tmb != 1) { url = file.tmb; } if (url) { if (tmbUrl !== 'self') { if (file.ts) { cData._t = file.ts; } if (cwdOptions.tmbReqCustomData && Object.keys(this.customData).length) { cData = Object.assign(cData, this.customData); } if (Object.keys(cData).length) { url += (url.match(/\?/) ? '&' : '?'); $.each(cData, function (key, val) { url += ((n++ === 0)? '' : '&') + encodeURIComponent(key) + '=' + encodeURIComponent(val); }); } } return { url: url, className: cls }; } } return false; }; /** * Return selected files hashes * * @return Array **/ this.selected = function() { return selected.slice(0); }; /** * Return selected files info * * @return Array */ this.selectedFiles = function() { return $.map(selected, function(hash) { return files[hash] ? Object.assign({}, files[hash]) : null; }); }; /** * Return true if file with required name existsin required folder * * @param String file name * @param String parent folder hash * @return Boolean */ this.fileByName = function(name, phash) { var hash; for (hash in files) { if (files.hasOwnProperty(hash) && files[hash].phash == phash && files[hash].name == name) { return files[hash]; } } }; /** * Valid data for required command based on rules * * @param String command name * @param Object cammand's data * @return Boolean */ this.validResponse = function(cmd, data) { return data.error || this.rules[this.rules[cmd] ? cmd : 'defaults'](data); }; /** * Return bytes from ini formated size * * @param String ini formated size * @return Integer */ this.returnBytes = function(val) { var last; if (isNaN(val)) { if (! val) { val = ''; } // for ex. 1mb, 1KB val = val.replace(/b$/i, ''); last = val.charAt(val.length - 1).toLowerCase(); val = val.replace(/[tgmk]$/i, ''); if (last == 't') { val = val * 1024 * 1024 * 1024 * 1024; } else if (last == 'g') { val = val * 1024 * 1024 * 1024; } else if (last == 'm') { val = val * 1024 * 1024; } else if (last == 'k') { val = val * 1024; } val = isNaN(val)? 0 : parseInt(val); } else { val = parseInt(val); if (val < 1) val = 0; } return val; }; /** * Process ajax request. * Fired events : * @todo * @example * @todo * @return $.Deferred */ this.request = function(opts) { var self = this, o = this.options, dfrd = $.Deferred(), // request ID reqId = (+ new Date()).toString(16) + Math.floor(1000 * Math.random()).toString(16), // request data data = Object.assign({}, self.customData, {mimes : o.onlyMimes}, opts.data || opts), // command name cmd = data.cmd, // request type is binary isBinary = (opts.options || {}).dataType === 'binary', // current cmd is "open" isOpen = (!opts.asNotOpen && cmd === 'open'), // the tree option is enabled (for "open" command) isTree = (data.tree === 1), // call default fail callback (display error dialog) ? deffail = !(isBinary || opts.preventDefault || opts.preventFail), // call default success callback ? defdone = !(isBinary || opts.preventDefault || opts.preventDone), // current progress of receive data prog = opts.progressVal || 20, // timer of fake progress progTm = null, // whether the notification dialog is currently displayed hasNotify= false, // options for notify dialog notify = !opts.progressBar? (opts.notify? Object.assign({progress: prog * opts.notify.cnt}, opts.notify) : {}) : {}, // make cancel button cancel = !!opts.cancel, // do not normalize data - return as is raw = isBinary || !!opts.raw, // sync files on request fail syncOnFail = opts.syncOnFail, // use lazy() lazy = !!opts.lazy, // prepare function before done() prepare = opts.prepare, // navigate option object when cmd done navigate = opts.navigate, // open notify dialog timeout timeout, // use browser cache useCache = (opts.options || {}).cache, // request options options = Object.assign({ url : o.url, async : true, type : this.requestType, dataType : 'json', cache : (self.api >= 2.1029), // api >= 2.1029 has unique request ID data : data, headers : this.customHeaders, xhrFields: this.xhrFields, progress : function(e) { var p = e.loaded / e.total * 100; progTm && clearTimeout(progTm); if (opts.progressBar) { try { opts.progressBar.width(p + '%'); } catch(e) {} } else { if (hasNotify && notify.type) { p = p * notify.cnt; if (prog < p) { self.notify({ type: notify.type, progress: p - prog, cnt: 0, hideCnt: notify.hideCnt }); prog = p; } } } if (opts.progress) { try { opts.progress(e); } catch(e) {} } } }, opts.options || {}), /** * Default success handler. * Call default data handlers and fire event with command name. * * @param Object normalized response data * @return void **/ done = function(data) { data.warning && self.error(data.warning); if (isOpen) { open(data); } else { self.updateCache(data); } self.lazy(function() { // fire some event to update cache/ui data.removed && data.removed.length && self.remove(data); data.added && data.added.length && self.add(data); data.changed && data.changed.length && self.change(data); }).then(function() { // fire event with command name return self.lazy(function() { self.trigger(cmd, data, false); }); }).then(function() { // fire event with command name + 'done' return self.lazy(function() { self.trigger(cmd + 'done'); }); }).then(function() { // make toast message if (data.toasts && Array.isArray(data.toasts)) { $.each(data.toasts, function() { this.msg && self.toast(this); }); } // force update content data.sync && self.sync(); }); }, /** * Request error handler. Reject dfrd with correct error message. * * @param jqxhr request object * @param String request status * @return void **/ error = function(xhr, status) { var error, data, d = self.options.debug; switch (status) { case 'abort': error = xhr.quiet ? '' : ['errConnect', 'errAbort']; break; case 'timeout': error = ['errConnect', 'errTimeout']; break; case 'parsererror': error = ['errResponse', 'errDataNotJSON']; if (xhr.responseText) { if (! cwd || (d && (d === 'all' || d['backend-error']))) { error.push(xhr.responseText); } } break; default: if (xhr.responseText) { // check responseText, Is that JSON? try { data = JSON.parse(xhr.responseText); xhr._elfinderResponse = data; if (data && data.error) { error = data.error; } } catch(e) {} } if (! error) { if (xhr.status == 403) { error = ['errConnect', 'errAccess', 'HTTP error ' + xhr.status]; } else if (xhr.status == 404) { error = ['errConnect', 'errNotFound', 'HTTP error ' + xhr.status]; } else if (xhr.status >= 500) { error = ['errResponse', 'errServerError', 'HTTP error ' + xhr.status]; } else { if (xhr.status == 414 && options.type === 'get') { // retry by POST method options.type = 'post'; self.abortXHR(xhr); dfrd.xhr = xhr = self.transport.send(options).fail(error).done(success); return; } error = xhr.quiet ? '' : ['errConnect', 'HTTP error ' + xhr.status]; } } } self.trigger(cmd + 'done'); dfrd.reject({error: error}, xhr, status); }, /** * Request success handler. Valid response data and reject/resolve dfrd. * * @param Object response data * @param String request status * @return void **/ success = function(response) { // Set currrent request command name self.currentReqCmd = cmd; response.debug && self.responseDebug(response); self.setCustomHeaderByXhr(xhr); if (raw) { self.abortXHR(xhr); response && response.debug && self.debug('backend-debug', response); return dfrd.resolve(response); } if (!response) { return dfrd.reject({error :['errResponse', 'errDataEmpty']}, xhr, response); } else if (!$.isPlainObject(response)) { return dfrd.reject({error :['errResponse', 'errDataNotJSON']}, xhr, response); } if (isOpen && !!data.init && Object.prototype.hasOwnProperty.call(response, self.csrfResponseKey)) { self.setCsrfToken(response[self.csrfResponseKey]); } if (response.error) { if (isOpen) { // check leafRoots $.each(self.leafRoots, function(phash, roots) { self.leafRoots[phash] = $.grep(roots, function(h) { return h !== data.target; }); }); } return dfrd.reject({error :response.error}, xhr, response); } var resolve = function() { var pushLeafRoots = function(name) { if (self.leafRoots[data.target] && response[name]) { $.each(self.leafRoots[data.target], function(i, h) { var root; if (root = self.file(h)) { response[name].push(root); } }); } }, setTextMimes = function() { self.textMimes = {}; $.each(self.res('mimes', 'text'), function() { self.textMimes[this.toLowerCase()] = true; }); }, actionTarget; if (isOpen && !isTree) { pushLeafRoots('files'); } else if (cmd === 'tree') { pushLeafRoots('tree'); } response = self.normalize(response); if (!self.validResponse(cmd, response)) { return dfrd.reject({error :(response.norError || 'errResponse')}, xhr, response); } if (isOpen) { if (!self.api) { self.api = response.api || 1; if (self.api == '2.0' && typeof response.options.uploadMaxSize !== 'undefined') { self.api = '2.1'; } self.newAPI = self.api >= 2; self.oldAPI = !self.newAPI; } if (response.textMimes && Array.isArray(response.textMimes)) { self.resources.mimes.text = response.textMimes; setTextMimes(); } !self.textMimes && setTextMimes(); if (response.options) { cwdOptions = Object.assign({}, cwdOptionsDefault, response.options); } if (response.netDrivers) { self.netDrivers = response.netDrivers; } if (response.maxTargets) { self.maxTargets = response.maxTargets; } if (!!data.init) { self.uplMaxSize = self.returnBytes(response.uplMaxSize); self.uplMaxFile = !!response.uplMaxFile? Math.min(parseInt(response.uplMaxFile), 50) : 20; } } if (typeof prepare === 'function') { prepare(response); } if (navigate) { actionTarget = navigate.target || 'added'; if (response[actionTarget] && response[actionTarget].length) { self.one(cmd + 'done', function() { var targets = response[actionTarget], newItems = self.findCwdNodes(targets), inCwdHashes = function() { var cwdHash = self.cwd().hash; return $.map(targets, function(f) { return (f.phash && cwdHash === f.phash)? f.hash : null; }); }, hashes = inCwdHashes(), makeToast = function(t) { var node = void(0), data = t.action? t.action.data : void(0), cmd, msg, done; if ((data || hashes.length) && t.action && (msg = t.action.msg) && (cmd = t.action.cmd) && (!t.action.cwdNot || t.action.cwdNot !== self.cwd().hash)) { done = t.action.done; data = t.action.data; node = $('
') .append( $('') .on('mouseenter mouseleave', function(e) { $(this).toggleClass('ui-state-hover', e.type == 'mouseenter'); }) .on('click', function() { self.exec(cmd, data || hashes, {_userAction: true, _currentType: 'toast', _currentNode: $(this) }); if (done) { self.one(cmd+'done', function() { if (typeof done === 'function') { done(); } else if (done === 'select') { self.trigger('selectfiles', {files : inCwdHashes()}); } }); } }) ); } delete t.action; t.extNode = node; return t; }; if (! navigate.toast) { navigate.toast = {}; } !navigate.noselect && self.trigger('selectfiles', {files : self.searchStatus.state > 1 ? $.map(targets, function(f) { return f.hash; }) : hashes}); if (newItems.length) { if (!navigate.noscroll) { newItems.first().trigger('scrolltoview', {blink : false}); self.resources.blink(newItems, 'lookme'); } if ($.isPlainObject(navigate.toast.incwd)) { self.toast(makeToast(navigate.toast.incwd)); } } else { if ($.isPlainObject(navigate.toast.inbuffer)) { self.toast(makeToast(navigate.toast.inbuffer)); } } }); } } dfrd.resolve(response); response.debug && self.debug('backend-debug', response); }; self.abortXHR(xhr); lazy? self.lazy(resolve) : resolve(); }, xhr, _xhr, xhrAbort = function(e) { if (xhr && xhr.state() === 'pending') { self.abortXHR(xhr, { quiet: true , abort: true }); if (!e || (e.type !== 'unload' && e.type !== 'destroy')) { self.autoSync(); } } }, abort = function(e){ self.trigger(cmd + 'done'); if (e.type == 'autosync') { if (e.data.action != 'stop') return; } else if (e.type != 'unload' && e.type != 'destroy' && e.type != 'openxhrabort') { if (!e.data.added || !e.data.added.length) { return; } } xhrAbort(e); }, request = function(mode) { var queueAbort = function() { syncOnFail = false; dfrd.reject(); }; if (mode) { if (mode === 'cmd') { return cmd; } } if (isOpen) { if (currentOpenCmd && currentOpenCmd.state() === 'pending') { if (currentOpenCmd._target === data.target) { return dfrd.reject('openabort'); } else { if (currentOpenCmd.xhr) { currentOpenCmd.xhr.queueAbort(); } else { currentOpenCmd.reject('openabort'); } } } currentOpenCmd = dfrd; currentOpenCmd._target = data.target; } dfrd.always(function() { delete options.headers['X-elFinderReqid']; if (isOpen) { currentOpenCmd = null; } }).fail(function(error, xhr, response) { var errData, errMsg; if (isOpen && error === 'openabort') { error = ''; syncOnFail = false; } errData = { cmd: cmd, err: error, xhr: xhr, rc: response }; // unset this cmd queue when user canceling // see notify : function - `cancel.reject(0);` if (error === 0) { if (requestQueue.length) { requestQueue = $.grep(requestQueue, function(req) { return (req('cmd') === cmd) ? false : true; }); } } // trigger "requestError" event self.trigger('requestError', errData); if (errData._getEvent && errData._getEvent().isDefaultPrevented()) { deffail = false; syncOnFail = false; if (error) { error.error = ''; } } else if (xhr && self.handleCsrfReload(xhr, xhr._elfinderResponse)) { deffail = false; syncOnFail = false; if (error) { error.error = ''; } } // abort xhr xhrAbort(); if (isOpen) { openDir = self.file(data.target); openDir && openDir.volumeid && self.isRoot(openDir) && delete self.volumeExpires[openDir.volumeid]; } self.trigger(cmd + 'fail', response); errMsg = (typeof error === 'object')? error.error : error; if (errMsg) { deffail ? self.error(errMsg) : self.debug('error', self.i18n(errMsg)); } syncOnFail && self.sync(); }); if (!cmd) { syncOnFail = false; return dfrd.reject({error :'errCmdReq'}); } if (self.maxTargets && data.targets && data.targets.length > self.maxTargets) { syncOnFail = false; return dfrd.reject({error :['errMaxTargets', self.maxTargets]}); } defdone && dfrd.done(done); // quiet abort not completed "open" requests if (isOpen) { while ((_xhr = queue.pop())) { _xhr.queueAbort(); } if (cwd !== data.target) { while ((_xhr = cwdQueue.pop())) { _xhr.queueAbort(); } } } // trigger abort autoSync for commands to add the item if ($.inArray(cmd, (self.cmdsToAdd + ' autosync').split(' ')) !== -1) { if (cmd !== 'autosync') { self.autoSync('stop'); dfrd.always(function() { self.autoSync(); }); } self.trigger('openxhrabort'); } delete options.preventFail; if (self.api >= 2.1029) { if (useCache) { options.headers['X-elFinderReqid'] = reqId; } else { Object.assign(options.data, { reqid : reqId }); } } // function for set value of this syncOnFail dfrd.syncOnFail = function(state) { syncOnFail = !!state; }; requestCnt++; dfrd.xhr = xhr = self.transport.send(options).always(function() { // set responseURL from native xhr object if (options._xhr && typeof options._xhr.responseURL !== 'undefined') { xhr.responseURL = options._xhr.responseURL || ''; } --requestCnt; if (requestQueue.length) { requestQueue.shift()(); } }).fail(error).done(success); xhr._csrfRefresh = !!opts._csrfRefresh; if (self.api >= 2.1029) { xhr._requestId = reqId; } if (isOpen || (data.compare && cmd === 'info')) { // regist function queueAbort xhr.queueAbort = queueAbort; // add autoSync xhr into queue queue.unshift(xhr); // bind abort() data.compare && self.bind(self.cmdsToAdd + ' autosync openxhrabort', abort); dfrd.always(function() { var ndx = $.inArray(xhr, queue); data.compare && self.unbind(self.cmdsToAdd + ' autosync openxhrabort', abort); ndx !== -1 && queue.splice(ndx, 1); }); } else if ($.inArray(cmd, self.abortCmdsOnOpen) !== -1) { // regist function queueAbort xhr.queueAbort = queueAbort; // add "open" xhr, only cwd xhr into queue cwdQueue.unshift(xhr); dfrd.always(function() { var ndx = $.inArray(xhr, cwdQueue); ndx !== -1 && cwdQueue.splice(ndx, 1); }); } // abort pending xhr on window unload or elFinder destroy self.bind('unload destroy', abort); dfrd.always(function() { self.unbind('unload destroy', abort); }); return dfrd; }, queueingRequest = function() { // show notify if (notify.type && notify.cnt) { if (cancel) { notify.cancel = dfrd; opts.eachCancel && (notify.id = +new Date()); } timeout = setTimeout(function() { // start fake count up progTm = setTimeout(progFakeUp, 1000); self.notify(notify); hasNotify = true; dfrd.always(function() { notify.cnt = -(parseInt(notify.cnt)||0); self.notify(notify); hasNotify = false; }); }, self.notifyDelay); dfrd.always(function() { clearTimeout(timeout); }); } // queueing if (requestCnt < requestMaxConn) { // do request return request(); } else { if (isOpen) { requestQueue.unshift(request); } else { requestQueue.push(request); } return dfrd; } }, progFakeUp = function() { var add; if (hasNotify && progTm) { add = 1 * notify.cnt; progTm = null; self.notify({ type: notify.type, progress: add, cnt: 0, hideCnt: notify.hideCnt }); prog += add; if ((prog / notify.cnt) < 80) { progTm = setTimeout(progFakeUp, 500); } } }, bindData = {opts: opts, result: true}, openDir; // prevent request initial request is completed if (!self.api && !data.init) { syncOnFail = false; return dfrd.reject(); } // trigger "request.cmd" that callback be able to cancel request by substituting "false" for "event.data.result" self.trigger('request.' + cmd, bindData, true); if (! bindData.result) { self.trigger(cmd + 'done'); return dfrd.reject(); } else if (typeof bindData.result === 'object' && bindData.result.promise) { bindData.result .done(queueingRequest) .fail(function() { self.trigger(cmd + 'done'); dfrd.reject(); }); return dfrd; } return queueingRequest(); }; /** * Call cache() * Store info about files/dirs in "files" object. * * @param Array files * @param String type * @return void */ this.cache = function(dataArray, type) { if (! Array.isArray(dataArray)) { dataArray = [ dataArray ]; } cache(dataArray, type); }; /** * Update file object caches by respose data object * * @param Object respose data object * @return void */ this.updateCache = function(data) { if ($.isPlainObject(data)) { data.files && data.files.length && cache(data.files, 'files'); data.tree && data.tree.length && cache(data.tree, 'tree'); data.removed && data.removed.length && remove(data.removed); data.added && data.added.length && cache(data.added, 'add'); data.changed && data.changed.length && cache(data.changed, 'change'); } }; /** * Compare current files cache with new files and return diff * * @param Array new files * @param String target folder hash * @param Array exclude properties to compare * @return Object */ this.diff = function(incoming, onlydir, excludeProps) { var raw = {}, added = [], removed = [], changed = [], excludes = null, isChanged = function(hash) { var l = changed.length; while (l--) { if (changed[l].hash == hash) { return true; } } }; $.each(incoming, function(i, f) { raw[f.hash] = f; }); // make excludes object if (excludeProps && excludeProps.length) { excludes = {}; $.each(excludeProps, function() { excludes[this] = true; }); } // find removed $.each(files, function(hash, f) { if (! raw[hash] && (! onlydir || f.phash === onlydir)) { removed.push(hash); } }); // compare files $.each(raw, function(hash, file) { var origin = files[hash], orgKeys = {}, chkKeyLen; if (!origin) { added.push(file); } else { // make orgKeys object $.each(Object.keys(origin), function() { orgKeys[this] = true; }); $.each(file, function(prop) { delete orgKeys[prop]; if (! excludes || ! excludes[prop]) { if (file[prop] !== origin[prop]) { changed.push(file); orgKeys = {}; return false; } } }); chkKeyLen = Object.keys(orgKeys).length; if (chkKeyLen !== 0) { if (excludes) { $.each(orgKeys, function(prop) { if (excludes[prop]) { --chkKeyLen; } }); } (chkKeyLen !== 0) && changed.push(file); } } }); // parents of removed dirs mark as changed (required for tree correct work) $.each(removed, function(i, hash) { var file = files[hash], phash = file.phash; if (phash && file.mime == 'directory' && $.inArray(phash, removed) === -1 && raw[phash] && !isChanged(phash)) { changed.push(raw[phash]); } }); return { added : added, removed : removed, changed : changed }; }; /** * Sync Stopper * * @type Boolean */ this.syncStopper = false; /** * Sync content * * @return jQuery.Deferred */ this.sync = function(onlydir, polling) { if (this.syncStopper) { return $.Deferred().reject(); } this.syncStopper = true; this.autoSync('stop'); var self = this, compare = function(){ var c = '', cnt = 0, mtime = 0; if (onlydir && polling) { $.each(files, function(h, f) { if (f.phash && f.phash === onlydir) { ++cnt; mtime = Math.max(mtime, f.ts); } c = cnt+':'+mtime; }); } return c; }, comp = compare(), odataRoots, dfrd = $.Deferred().always(function() { !reqFail && self.trigger('sync'); }), tree = (! onlydir && this.ui.tree) ? 1 : 0, opts = [this.request({ data : {cmd : 'open', reload : 1, target : cwd, tree : tree, compare : comp}, preventDefault : true })], exParents = function() { var parents = [], curRoot = self.file(self.root(cwd)), curId = curRoot? curRoot.volumeid : null, phash = self.cwd().phash, isroot,pdir; while(phash) { if (pdir = self.file(phash)) { if (phash.indexOf(curId) !== 0) { parents.push( {target: phash, cmd: 'tree'} ); if (! self.isRoot(pdir)) { parents.push( {target: phash, cmd: 'parents'} ); } curRoot = self.file(self.root(phash)); curId = curRoot? curRoot.volumeid : null; } phash = pdir.phash; } else { phash = null; } } return parents; }, reqFail; if (! onlydir && self.api >= 2) { (cwd !== this.root()) && opts.push(this.request({ data : {cmd : 'parents', target : cwd}, preventDefault : true })); $.each(exParents(), function(i, data) { opts.push(self.request({ data : {cmd : data.cmd, target : data.target}, preventDefault : true })); }); } $.when.apply($, opts) .fail(function(error, xhr) { reqFail = (xhr && xhr.status != 200); if (! polling || $.inArray('errOpen', error) !== -1) { dfrd.reject(error); self.parseError(error) && self.request({ data : {cmd : 'open', target : (self.lastDir('') || self.root()), tree : 1, init : 1}, notify : {type : 'open', cnt : 1, hideCnt : true} }); } else { dfrd.reject((error && xhr.status != 0)? error : void 0); } }) .done(function(odata) { var pdata, argLen, i; if (odata.cwd.compare) { if (comp === odata.cwd.compare) { return dfrd.reject(); } } // for 2nd and more requests pdata = {tree : []}; // results marge of 2nd and more requests argLen = arguments.length; if (argLen > 1) { for(i = 1; i < argLen; i++) { if (arguments[i].tree && arguments[i].tree.length) { pdata.tree.push.apply(pdata.tree, arguments[i].tree); } } } if (self.api < 2.1) { if (! pdata.tree) { pdata.tree = []; } pdata.tree.push(odata.cwd); } // data normalize odata = self.normalize(odata); if (!self.validResponse('open', odata)) { return dfrd.reject((odata.norError || 'errResponse')); } pdata = self.normalize(pdata); if (!self.validResponse('tree', pdata)) { return dfrd.reject((pdata.norError || 'errResponse')); } // When tree = 1, the server will return all volumes in response to the open command. // Remove volumes from the tree command that do not exist anymore. if (tree && pdata && pdata.tree) { odataRoots = $.map($.grep(odata.files, function(f) {return f.isroot;}), function(f) {return f.hash;}); pdata.tree = $.grep(pdata.tree, function(f) {return !f.isroot || odataRoots.indexOf(f.hash) >= 0;}); } var diff = self.diff(odata.files.concat(pdata && pdata.tree ? pdata.tree : []), onlydir); diff.added.push(odata.cwd); self.updateCache(diff); // trigger events diff.removed.length && self.remove(diff); diff.added.length && self.add(diff); diff.changed.length && self.change(diff); return dfrd.resolve(diff); }) .always(function() { self.syncStopper = false; self.autoSync(); }); return dfrd; }; this.upload = function(files) { return this.transport.upload(files, this); }; /** * Bind keybord shortcut to keydown event * * @example * elfinder.shortcut({ * pattern : 'ctrl+a', * description : 'Select all files', * callback : function(e) { ... }, * keypress : true|false (bind to keypress instead of keydown) * }) * * @param Object shortcut config * @return elFinder */ this.shortcut = function(s) { var patterns, pattern, code, i, parts; if (this.options.allowShortcuts && s.pattern && typeof s.callback === 'function') { patterns = s.pattern.toUpperCase().split(/\s+/); for (i= 0; i < patterns.length; i++) { pattern = patterns[i]; parts = pattern.split('+'); code = (code = parts.pop()).length == 1 ? (code > 0 ? code : code.charCodeAt(0)) : (code > 0 ? code : $.ui.keyCode[code]); if (code && !shortcuts[pattern]) { shortcuts[pattern] = { keyCode : code, altKey : $.inArray('ALT', parts) != -1, ctrlKey : $.inArray('CTRL', parts) != -1, shiftKey : $.inArray('SHIFT', parts) != -1, type : s.type || 'keydown', callback : s.callback, description : s.description, pattern : pattern }; } } } return this; }; /** * Registered shortcuts * * @type Object **/ this.shortcuts = function() { var ret = []; $.each(shortcuts, function(i, s) { ret.push([s.pattern, self.i18n(s.description)]); }); return ret; }; /** * Get/set clipboard content. * Return new clipboard content. * * @example * this.clipboard([]) - clean clipboard * this.clipboard([{...}, {...}], true) - put 2 files in clipboard and mark it as cutted * * @param Array new files hashes * @param Boolean cut files? * @return Array */ this.clipboard = function(hashes, cut) { var map = function() { return $.map(clipboard, function(f) { return f.hash; }); }; if (hashes !== void(0)) { clipboard.length && this.trigger('unlockfiles', {files : map()}); remember = {}; clipboard = $.map(hashes||[], function(hash) { var file = files[hash]; if (file) { remember[hash] = true; return { hash : hash, phash : file.phash, name : file.name, mime : file.mime, read : file.read, locked : file.locked, cut : !!cut }; } return null; }); this.trigger('changeclipboard', {clipboard : clipboard.slice(0, clipboard.length)}); cut && this.trigger('lockfiles', {files : map()}); } // return copy of clipboard instead of refrence return clipboard.slice(0, clipboard.length); }; /** * Return true if command enabled * * @param String command name * @param String|void hash for check of own volume's disabled cmds * @return Boolean */ this.isCommandEnabled = function(name, dstHash) { var disabled, cmd, cvid = self.cwd().volumeid || ''; // In serach results use selected item hash to check if (!dstHash && self.searchStatus.state > 1 && self.selected().length) { dstHash = self.selected()[0]; } if (dstHash && (! cvid || dstHash.indexOf(cvid) !== 0)) { disabled = self.option('disabledFlip', dstHash); //if (! disabled) { // disabled = {}; //} } else { disabled = cwdOptions.disabledFlip/* || {}*/; } cmd = this._commands[name]; return cmd ? (cmd.alwaysEnabled || !disabled[name]) : false; }; /** * Exec command and return result; * * @param String command name * @param String|Array usualy files hashes * @param String|Array command options * @param String|void hash for enabled check of own volume's disabled cmds * @return $.Deferred */ this.exec = function(cmd, files, opts, dstHash) { var dfrd, resType; // apply commandMap for keyboard shortcut if (!dstHash && this.commandMap[cmd] && this.commandMap[cmd] !== 'hidden') { cmd = this.commandMap[cmd]; } if (cmd === 'open') { if (this.searchStatus.state || this.searchStatus.ininc) { this.trigger('searchend', { noupdate: true }); } this.autoSync('stop'); } if (!dstHash && files) { if (Array.isArray(files)) { if (files.length) { dstHash = files[0]; } } else { dstHash = files; } } dfrd = this._commands[cmd] && this.isCommandEnabled(cmd, dstHash) ? this._commands[cmd].exec(files, opts) : $.Deferred().reject('errUnknownCmd'); resType = typeof dfrd; if (!(resType === 'object' && dfrd.promise)) { self.debug('warning', '"cmd.exec()" should be returned "$.Deferred" but cmd "' + cmd + '" returned "' + resType + '"'); dfrd = $.Deferred().resolve(); } this.trigger('exec', { dfrd : dfrd, cmd : cmd, files : files, opts : opts, dstHash : dstHash }); return dfrd; }; /** * Create and return dialog. * * @param String|DOMElement dialog content * @param Object dialog options * @return jQuery */ this.dialog = function(content, options) { var dialog = $('
').append(content).appendTo(node).elfinderdialog(options, self), dnode = dialog.closest('.ui-dialog'), resize = function(){ ! dialog.data('draged') && dialog.is(':visible') && dialog.elfinderdialog('posInit'); }; if (dnode.length) { self.bind('resize', resize); dnode.on('remove', function() { self.unbind('resize', resize); }); } return dialog; }; /** * Create and return toast. * * @param Object toast options - see ui/toast.js * @return jQuery */ this.toast = function(options) { return $('
').appendTo(this.ui.toast).elfindertoast(options || {}, this); }; /** * Return UI widget or node * * @param String ui name * @return jQuery */ this.getUI = function(ui) { return ui? (this.ui[ui] || $()) : node; }; /** * Return elFinder.command instance or instances array * * @param String command name * @return Object | Array */ this.getCommand = function(name) { return name === void(0) ? this._commands : this._commands[name]; }; /** * Resize elfinder node * * @param String|Number width * @param String|Number height * @return void */ this.resize = function(w, h) { var getMargin = function() { var m = node.outerHeight(true) - node.innerHeight(), p = node; while(p.get(0) !== heightBase.get(0)) { p = p.parent(); m += p.outerHeight(true) - p.innerHeight(); if (! p.parent().length) { // reached the document break; } } return m; }, fit = ! node.hasClass('ui-resizable'), prv = node.data('resizeSize') || {w: 0, h: 0}, mt, size = {}; if (heightBase && heightBase.data('resizeTm')) { clearTimeout(heightBase.data('resizeTm')); } if (! self.options.noResizeBySelf) { if (typeof h === 'string') { if (mt = h.match(/^([0-9.]+)%$/)) { // setup heightBase if (! heightBase || ! heightBase.length) { heightBase = $(window); } if (! heightBase.data('marginToMyNode')) { heightBase.data('marginToMyNode', getMargin()); } if (! heightBase.data('fitToBaseFunc')) { heightBase.data('fitToBaseFunc', function(e) { var tm = heightBase.data('resizeTm'); e.preventDefault(); e.stopPropagation(); tm && cancelAnimationFrame(tm); if (! node.hasClass('elfinder-fullscreen') && (!self.UA.Mobile || heightBase.data('rotated') !== self.UA.Rotated)) { heightBase.data('rotated', self.UA.Rotated); heightBase.data('resizeTm', requestAnimationFrame(function() { self.restoreSize(); })); } }); } if (typeof heightBase.data('rotated') === 'undefined') { heightBase.data('rotated', self.UA.Rotated); } h = heightBase.height() * (mt[1] / 100) - heightBase.data('marginToMyNode'); heightBase.off('resize.' + self.namespace, heightBase.data('fitToBaseFunc')); fit && heightBase.on('resize.' + self.namespace, heightBase.data('fitToBaseFunc')); } } node.css({ width : w, height : parseInt(h) }); } size.w = Math.round(node.width()); size.h = Math.round(node.height()); node.data('resizeSize', size); if (size.w !== prv.w || size.h !== prv.h) { node.trigger('resize'); this.trigger('resize', {width : size.w, height : size.h}); } }; /** * Restore elfinder node size * * @return elFinder */ this.restoreSize = function() { this.resize(width, height); }; this.show = function() { node.show(); this.enable().trigger('show'); }; this.hide = function() { if (this.options.enableAlways) { prevEnabled = enabled; enabled = false; } this.disable(); this.trigger('hide'); node.hide(); }; /** * Lazy execution function * * @param Object function * @param Number delay * @param Object options * @return Object jQuery.Deferred */ this.lazy = function(func, delay, opts) { var busy = function(state) { var cnt = node.data('lazycnt'), repaint; if (state) { repaint = node.data('lazyrepaint')? false : opts.repaint; if (! cnt) { node.data('lazycnt', 1) .addClass('elfinder-processing'); } else { node.data('lazycnt', ++cnt); } if (repaint) { node.data('lazyrepaint', true).css('display'); // force repaint } } else { if (cnt && cnt > 1) { node.data('lazycnt', --cnt); } else { repaint = node.data('lazyrepaint'); node.data('lazycnt', 0) .removeData('lazyrepaint') .removeClass('elfinder-processing'); repaint && node.css('display'); // force repaint; self.trigger('lazydone'); } } }, dfd = $.Deferred(), callFunc = function() { dfd.resolve(func.call(dfd)); busy(false); }; delay = delay || 0; opts = opts || {}; busy(true); if (delay) { setTimeout(callFunc, delay); } else { requestAnimationFrame(callFunc); } return dfd; }; /** * Destroy this elFinder instance * * @return void **/ this.destroy = function() { if (node && node[0].elfinder) { node.hasClass('elfinder-fullscreen') && self.toggleFullscreen(node); this.options.syncStart = false; this.autoSync('forcestop'); this.trigger('destroy').disable(); clipboard = []; selected = []; listeners = {}; shortcuts = {}; $(window).off('.' + namespace); $(document).off('.' + namespace); self.trigger = function(){}; $(beeper).remove(); node.off() .removeData() .empty() .append(prevContent.contents()) .attr('class', prevContent.attr('class')) .attr('style', prevContent.attr('style')); delete node[0].elfinder; // restore kept events $.each(prevEvents, function(n, arr) { $.each(arr, function(i, o) { node.on(o.type + (o.namespace? '.'+o.namespace : ''), o.selector, o.handler); }); }); } }; /** * Start or stop auto sync * * @param String|Bool stop * @return void */ this.autoSync = function(mode) { var sync; if (self.options.sync >= 1000) { if (syncInterval) { clearTimeout(syncInterval); syncInterval = null; self.trigger('autosync', {action : 'stop'}); } if (mode === 'stop') { ++autoSyncStop; } else { autoSyncStop = Math.max(0, --autoSyncStop); } if (autoSyncStop || mode === 'forcestop' || ! self.options.syncStart) { return; } // run interval sync sync = function(start){ var timeout; if (cwdOptions.syncMinMs && (start || syncInterval)) { start && self.trigger('autosync', {action : 'start'}); timeout = Math.max(self.options.sync, cwdOptions.syncMinMs); syncInterval && clearTimeout(syncInterval); syncInterval = setTimeout(function() { var dosync = true, hash = cwd, cts; if (cwdOptions.syncChkAsTs && files[hash] && (cts = files[hash].ts)) { self.request({ data : {cmd : 'info', targets : [hash], compare : cts, reload : 1}, preventDefault : true }) .done(function(data){ var ts; dosync = true; if (data.compare) { ts = data.compare; if (ts == cts) { dosync = false; } } if (dosync) { self.sync(hash).always(function(){ if (ts) { // update ts for cache clear etc. files[hash].ts = ts; } sync(); }); } else { sync(); } }) .fail(function(error, xhr){ var err = self.parseError(error); if (err && xhr.status != 0) { self.error(err); if (Array.isArray(err) && $.inArray('errOpen', err) !== -1) { self.request({ data : {cmd : 'open', target : (self.lastDir('') || self.root()), tree : 1, init : 1}, notify : {type : 'open', cnt : 1, hideCnt : true} }); } } else { syncInterval = setTimeout(function() { sync(); }, timeout); } }); } else { self.sync(cwd, true).always(function(){ sync(); }); } }, timeout); } }; sync(true); } }; /** * Return bool is inside work zone of specific point * * @param Number event.pageX * @param Number event.pageY * @return Bool */ this.insideWorkzone = function(x, y, margin) { var rectangle = this.getUI('workzone').data('rectangle'); margin = margin || 1; if (x < rectangle.left + margin || x > rectangle.left + rectangle.width + margin || y < rectangle.top + margin || y > rectangle.top + rectangle.height + margin) { return false; } return true; }; /** * Target ui node move to last of children of elFinder node fot to show front * * @param Object target Target jQuery node object */ this.toFront = function(target) { var nodes = node.children('.ui-front').removeClass('elfinder-frontmost'), lastnode = nodes.last(); nodes.css('z-index', ''); $(target).addClass('ui-front elfinder-frontmost').css('z-index', lastnode.css('z-index') + 1); }; /** * Remove class 'elfinder-frontmost' and hide() to target ui node * * @param Object target Target jQuery node object * @param Boolean nohide Do not hide */ this.toHide =function(target, nohide) { var tgt = $(target), last; !nohide && tgt.hide(); if (tgt.hasClass('elfinder-frontmost')) { tgt.removeClass('elfinder-frontmost'); last = node.children('.ui-front:visible:not(.elfinder-frontmost)').last(); if (last.length) { requestAnimationFrame(function() { if (!node.children('.elfinder-frontmost:visible').length) { self.toFront(last); last.trigger('frontmost'); } }); } } }; /** * Return css object for maximize * * @return Object */ this.getMaximizeCss = function() { return { width : '100%', height : '100%', margin : 0, top : 0, left : 0, display : 'block', position: 'fixed', zIndex : Math.max(self.zIndex? (self.zIndex + 1) : 0 , 1000), maxWidth : '', maxHeight: '' }; }; // Closure for togglefullscreen (function() { // check is in iframe if (inFrame && self.UA.Fullscreen) { self.UA.Fullscreen = false; if (parentIframe && typeof parentIframe.attr('allowfullscreen') !== 'undefined') { self.UA.Fullscreen = true; } } var orgStyle, bodyOvf, resizeTm, fullElm, exitFull, toFull, funcObj, cls = 'elfinder-fullscreen', clsN = 'elfinder-fullscreen-native', checkDialog = function() { var t = 0, l = 0; $.each(node.children('.ui-dialog,.ui-draggable'), function(i, d) { var $d = $(d), pos = $d.position(); if (pos.top < 0) { $d.css('top', t); t += 20; } if (pos.left < 0) { $d.css('left', l); l += 20; } }); }, setFuncObj = function() { var useFullscreen = self.storage('useFullscreen'); funcObj = self.UA.Fullscreen && (useFullscreen? useFullscreen > 0 : self.options.commandsOptions.fullscreen.mode === 'screen') ? { // native full screen mode fullElm: function() { return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || null; }, exitFull: function() { if (document.exitFullscreen) { return document.exitFullscreen(); } else if (document.webkitExitFullscreen) { return document.webkitExitFullscreen(); } else if (document.mozCancelFullScreen) { return document.mozCancelFullScreen(); } else if (document.msExitFullscreen) { return document.msExitFullscreen(); } }, toFull: function(elem) { if (elem.requestFullscreen) { return elem.requestFullscreen(); } else if (elem.webkitRequestFullscreen) { return elem.webkitRequestFullscreen(); } else if (elem.mozRequestFullScreen) { return elem.mozRequestFullScreen(); } else if (elem.msRequestFullscreen) { return elem.msRequestFullscreen(); } return false; } } : { // node element maximize mode fullElm: function() { var full; if (node.hasClass(cls)) { return node.get(0); } else { full = node.find('.' + cls); if (full.length) { return full.get(0); } } return null; }, exitFull: function() { var elm; $(window).off('resize.' + namespace, resize); if (bodyOvf !== void(0)) { $('body').css('overflow', bodyOvf); } bodyOvf = void(0); if (orgStyle) { elm = orgStyle.elm; restoreStyle(elm); $(elm).trigger('resize', {fullscreen: 'off'}); } $(window).trigger('resize'); }, toFull: function(elem) { bodyOvf = $('body').css('overflow') || ''; $('body').css('overflow', 'hidden'); $(elem).css(self.getMaximizeCss()) .addClass(cls) .trigger('resize', {fullscreen: 'on'}); checkDialog(); $(window).on('resize.' + namespace, resize).trigger('resize'); return true; } }; }, restoreStyle = function(elem) { if (orgStyle && orgStyle.elm == elem) { $(elem).removeClass(cls + ' ' + clsN).attr('style', orgStyle.style); orgStyle = null; } }, resize = function(e) { var elm; if (e.target === window) { resizeTm && cancelAnimationFrame(resizeTm); resizeTm = requestAnimationFrame(function() { if (elm = funcObj.fullElm()) { $(elm).trigger('resize', {fullscreen: 'on'}); } }); } }; setFuncObj(); $(document).on('fullscreenchange.' + namespace + ' webkitfullscreenchange.' + namespace + ' mozfullscreenchange.' + namespace + ' MSFullscreenChange.' + namespace, function(e){ if (self.UA.Fullscreen) { var elm = funcObj.fullElm(), win = $(window); resizeTm && cancelAnimationFrame(resizeTm); if (elm === null) { win.off('resize.' + namespace, resize); if (orgStyle) { elm = orgStyle.elm; restoreStyle(elm); $(elm).trigger('resize', {fullscreen: 'off'}); } } else { $(elm).addClass(cls + ' ' + clsN) .attr('style', 'width:100%; height:100%; margin:0; padding:0;') .trigger('resize', {fullscreen: 'on'}); win.on('resize.' + namespace, resize); checkDialog(); } win.trigger('resize'); } }); /** * Toggle Full Scrren Mode * * @param Object target * @param Bool full * @return Object | Null DOM node object of current full scrren */ self.toggleFullscreen = function(target, full) { var elm = $(target).get(0), curElm = null; curElm = funcObj.fullElm(); if (curElm) { if (curElm == elm) { if (full === true) { return curElm; } } else { if (full === false) { return curElm; } } funcObj.exitFull(); return null; } else { if (full === false) { return null; } } setFuncObj(); orgStyle = {elm: elm, style: $(elm).attr('style')}; if (funcObj.toFull(elm) !== false) { return elm; } else { orgStyle = null; return null; } }; })(); // Closure for toggleMaximize (function(){ var cls = 'elfinder-maximized', resizeTm, resize = function(e) { if (e.target === window && e.data && e.data.elm) { var elm = e.data.elm; resizeTm && cancelAnimationFrame(resizeTm); resizeTm = requestAnimationFrame(function() { elm.trigger('resize', {maximize: 'on'}); }); } }, exitMax = function(elm) { $(window).off('resize.' + namespace, resize); $('body').css('overflow', elm.data('bodyOvf')); elm.removeClass(cls) .attr('style', elm.data('orgStyle')) .removeData('bodyOvf') .removeData('orgStyle'); elm.trigger('resize', {maximize: 'off'}); }, toMax = function(elm) { elm.data('bodyOvf', $('body').css('overflow') || '') .data('orgStyle', elm.attr('style')) .addClass(cls) .css(self.getMaximizeCss()); $('body').css('overflow', 'hidden'); $(window).on('resize.' + namespace, {elm: elm}, resize); elm.trigger('resize', {maximize: 'on'}); }; /** * Toggle Maximize target node * * @param Object target * @param Bool max * @return void */ self.toggleMaximize = function(target, max) { var elm = $(target), maximized = elm.hasClass(cls); if (maximized) { if (max === true) { return; } exitMax(elm); } else { if (max === false) { return; } toMax(elm); } }; })(); /************* init stuffs ****************/ Object.assign($.ui.keyCode, { 'F1' : 112, 'F2' : 113, 'F3' : 114, 'F4' : 115, 'F5' : 116, 'F6' : 117, 'F7' : 118, 'F8' : 119, 'F9' : 120, 'F10' : 121, 'F11' : 122, 'F12' : 123, 'DIG0' : 48, 'DIG1' : 49, 'DIG2' : 50, 'DIG3' : 51, 'DIG4' : 52, 'DIG5' : 53, 'DIG6' : 54, 'DIG7' : 55, 'DIG8' : 56, 'DIG9' : 57, 'NUM0' : 96, 'NUM1' : 97, 'NUM2' : 98, 'NUM3' : 99, 'NUM4' : 100, 'NUM5' : 101, 'NUM6' : 102, 'NUM7' : 103, 'NUM8' : 104, 'NUM9' : 105, 'CONTEXTMENU' : 93, 'DOT' : 190 }); this.dragUpload = false; this.xhrUpload = (typeof XMLHttpRequestUpload != 'undefined' || typeof XMLHttpRequestEventTarget != 'undefined') && typeof File != 'undefined' && typeof FormData != 'undefined'; // configure transport object this.transport = {}; if (typeof(this.options.transport) == 'object') { this.transport = this.options.transport; if (typeof(this.transport.init) == 'function') { this.transport.init(this); } } if (typeof(this.transport.send) != 'function') { this.transport.send = function(opts) { if (!self.UA.IE) { // keep native xhr object for handling property responseURL opts._xhr = new XMLHttpRequest(); opts.xhr = function() { if (opts.progress) { opts._xhr.addEventListener('progress', opts.progress); } return opts._xhr; }; } return $.ajax(opts); }; } if (this.transport.upload == 'iframe') { this.transport.upload = this.uploads.iframe.bind(this); } else if (typeof(this.transport.upload) == 'function') { this.dragUpload = !!this.options.dragUploadAllow; } else if (this.xhrUpload && !!this.options.dragUploadAllow) { this.transport.upload = this.uploads.xhr.bind(this); this.dragUpload = true; } else { this.transport.upload = this.uploads.iframe.bind(this); } /** * Decoding 'raw' string converted to unicode * * @param String str * @return String */ this.decodeRawString = function(str) { var charCodes = function(str) { var i, len, arr; for (i=0,len=str.length,arr=[]; i= 0xd800 && c <= 0xdbff) { scalars.push((c & 1023) + 64 << 10 | arr[++i] & 1023); } else { scalars.push(c); } } return scalars; }, decodeUTF8 = function(arr) { var i, len, c, str, char = String.fromCharCode; for (i=0,len=arr.length,str=""; c=arr[i],i= 0xc2) { str += char((c&31)<<6 | arr[++i]&63); } else if (c <= 0xef && c >= 0xe0) { str += char((c&15)<<12 | (arr[++i]&63)<<6 | arr[++i]&63); } else if (c <= 0xf7 && c >= 0xf0) { str += char( 0xd800 | ((c&7)<<8 | (arr[++i]&63)<<2 | arr[++i]>>>4&3) - 64, 0xdc00 | (arr[i++]&15)<<6 | arr[i]&63 ); } else { str += char(0xfffd); } } return str; }; return decodeUTF8(scalarValues(str)); }; /** * Gets target file contents by file.hash * * @param String hash The hash * @param String responseType 'blob' or 'arraybuffer' (default) * @param Object requestOpts The request options * @return arraybuffer|blob The contents. */ this.getContents = function(hash, responseType, requestOpts) { var self = this, dfd = $.Deferred(), type = responseType || 'arraybuffer', url, req; dfd.fail(function() { req && req.state() === 'pending' && req.reject(); }); url = self.openUrl(hash); if (!self.isSameOrigin(url)) { url = self.openUrl(hash, true); } req = self.request(Object.assign({ data : {cmd : 'get'}, options : { url: url, type: 'get', cache : true, dataType : 'binary', responseType : type, processData: false }, notify : { type: 'file', cnt: 1, hideCnt: true }, cancel : true }, requestOpts || {})) .fail(function() { dfd.reject(); }) .done(function(data) { dfd.resolve(data); }); return dfd; }; /** * Gets the binary by url. * * @param {Object} opts The options * @param {Function} callback The callback * @param {Object} requestOpts The request options * @return arraybuffer|blob The contents. */ this.getBinaryByUrl = function(opts, callback, requestOpts) { var self = this, dfd = $.Deferred(), url, req; dfd.fail(function() { req && req.state() === 'pending' && req.reject(); }); req = self.request(Object.assign({ data : {cmd : 'get'}, options : Object.assign({ type: 'get', cache : true, dataType : 'binary', responseType : 'blob', processData: false }, opts) }, requestOpts || {})) .fail(function() { dfd.reject(); }) .done(function(data) { callback && callback(data); dfd.resolve(data); }); return dfd; }; /** * Gets the mimetype. * * @param {string} name The name * @param {string} orgMime The organization mime * @return {string} The mimetype. */ this.getMimetype = function(name, orgMime) { var mime = orgMime, ext, m; m = (name + '').match(/\.([^.]+)$/); if (m && (ext = m[1])) { if (!extToMimeTable) { extToMimeTable = self.arrayFlip(self.mimeTypes); } if (!(mime = extToMimeTable[ext.toLowerCase()])) { mime = orgMime; } } return mime; }; /** * Supported check hash algorisms * * @type Array */ self.hashCheckers = []; /** * Closure of getContentsHashes() */ (function(self) { var hashLibs = {}; if (window.Worker && window.ArrayBuffer) { // make fm.hashCheckers if (self.options.cdns.sparkmd5) { hashLibs.SparkMD5 = true; self.hashCheckers.push('md5'); } if (self.options.cdns.jssha) { hashLibs.jsSHA = true; self.hashCheckers = self.hashCheckers.concat(['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512', 'shake128', 'shake256']); } } /** * Gets the contents hashes. * * @param String target target file.hash * @param Object needHashes need hash lib names * @param Object requestOpts The request options * @return Object hashes with lib name as key */ self.getContentsHashes = function(target, needHashes, hashOpts, requestOpts) { var dfd = $.Deferred(), needs = self.arrayFlip(needHashes || ['md5'], true), libs = [], jobs = [], res = {}, opts = hashOpts? hashOpts : { shake128len : 256, shake256len : 512 }, req; dfd.fail(function() { req && req.reject(); }); if (Object.keys(hashLibs).length) { req = self.getContents(target, 'arraybuffer', requestOpts).done(function(arrayBuffer) { if (needs.md5 && hashLibs.SparkMD5) { jobs.push((function() { var job = $.Deferred(); try { var wk = self.getWorker(); job.fail(function() { wk && wk.terminate(); }); wk.onmessage = function(ans) { wk && wk.terminate(); if (ans.data.hash) { var f; res.md5 = ans.data.hash; if (f = self.file(target)) { f.md5 = res.md5; } } else if (ans.data.error) { res.md5 = ans.data.error; } dfd.notify(res); job.resolve(); }; wk.onerror = function(e) { job.reject(); }; wk.postMessage({ scripts: [self.options.cdns.sparkmd5, self.getWorkerUrl('calcfilehash.js')], data: { type: 'md5', bin: arrayBuffer } }); dfd.fail(function() { job.reject(); }); } catch(e) { job.reject(); delete hashLibs.SparkMD5; } return job; })()); } if (hashLibs.jsSHA) { $.each(['1', '224', '256', '384', '512', '3-224', '3-256', '3-384', '3-512', 'ke128', 'ke256'], function(i, v) { if (needs['sha' + v]) { jobs.push((function() { var job = $.Deferred(); try { var wk = self.getWorker(); job.fail(function() { wk && wk.terminate(); }); wk.onmessage = function(ans) { wk && wk.terminate(); if (ans.data.hash) { var f; res['sha' + v] = ans.data.hash; if (f = self.file(target)) { f['sha' + v] = res['sha' + v]; } } else if (ans.data.error) { res['sha' + v] = ans.data.error; } dfd.notify(res); job.resolve(); }; wk.onerror = function(e) { job.reject(); }; wk.postMessage({ scripts: [self.options.cdns.jssha, self.getWorkerUrl('calcfilehash.js')], data: { type: v, bin: arrayBuffer, hashOpts: opts } }); dfd.fail(function() { job.reject(); }); } catch(e) { job.reject(); delete hashLibs.jsSHA; } return job; })()); } }); } if (jobs.length) { $.when.apply(null, jobs).always(function() { dfd.resolve(res); }); } else { dfd.reject(); } }).fail(function() { dfd.reject(); }); } else { dfd.reject(); } return dfd; }; })(this); /** * Parse error value to display * * @param Mixed error * @return Mixed parsed error */ this.parseError = function(error) { var arg = error; if ($.isPlainObject(arg)) { arg = arg.error; } return arg; }; /** * Alias for this.trigger('error', {error : 'message'}) * * @param String error message * @return elFinder **/ this.error = function() { var arg = arguments[0], opts = arguments[1] || null, err; if (arguments.length == 1 && typeof(arg) === 'function') { return self.bind('error', arg); } else { err = this.parseError(arg); return (err === true || !err)? this : self.trigger('error', {error: err, opts : opts}); } }; // create bind/trigger aliases for build-in events $.each(events, function(i, name) { self[name] = function() { var arg = arguments[0]; return arguments.length == 1 && typeof(arg) == 'function' ? self.bind(name, arg) : self.trigger(name, $.isPlainObject(arg) ? arg : {}); }; }); // bind core event handlers this .enable(function() { if (!enabled && self.api && self.visible() && self.ui.overlay.is(':hidden') && ! node.children('.elfinder-dialog.' + self.res('class', 'editing') + ':visible').length) { enabled = true; document.activeElement && document.activeElement.blur(); node.removeClass('elfinder-disabled'); } }) .disable(function() { prevEnabled = enabled; enabled = false; node.addClass('elfinder-disabled'); }) .open(function() { selected = []; }) .select(function(e) { var cnt = 0, unselects = []; selected = $.grep(e.data.selected || e.data.value|| [], function(hash) { if (unselects.length || (self.maxTargets && ++cnt > self.maxTargets)) { unselects.push(hash); return false; } else { return files[hash] ? true : false; } }); if (unselects.length) { self.trigger('unselectfiles', {files: unselects, inselect: true}); self.toast({mode: 'warning', msg: self.i18n(['errMaxTargets', self.maxTargets])}); } }) .error(function(e) { var opts = { cssClass : 'elfinder-dialog-error', title : self.i18n('error'), resizable : false, destroyOnClose : true, buttons : {} }, node = self.getUI(), cnt = node.children('.elfinder-dialog-error').length, last, counter; if (cnt < self.options.maxErrorDialogs) { opts.buttons[self.i18n(self.i18n('btnClose'))] = function() { $(this).elfinderdialog('close'); }; if (e.data.opts && $.isPlainObject(e.data.opts)) { Object.assign(opts, e.data.opts); } self.dialog(''+self.i18n(e.data.error), opts); } else { last = node.children('.elfinder-dialog-error:last').children('.ui-dialog-content:first'); counter = last.children('.elfinder-error-counter'); if (counter.length) { counter.data('cnt', parseInt(counter.data('cnt')) + 1).html(self.i18n(['moreErrors', counter.data('cnt')])); } else { counter = $(''+ self.i18n(['moreErrors', 1]) +'').data('cnt', 1); last.append('
', counter); } } }) .bind('tmb', function(e) { $.each(e.data.images||[], function(hash, tmb) { if (files[hash]) { files[hash].tmb = tmb; } }); }) .bind('searchstart', function(e) { Object.assign(self.searchStatus, e.data); self.searchStatus.state = 1; }) .bind('search', function(e) { self.searchStatus.state = 2; }) .bind('searchend', function() { self.searchStatus.state = 0; self.searchStatus.ininc = false; self.searchStatus.mixed = false; }) .bind('canMakeEmptyFile', function(e) { var data = e.data, obj = {}; if (data && Array.isArray(data.mimes)) { if (!data.unshift) { obj = self.mimesCanMakeEmpty; } $.each(data.mimes, function() { if (!obj[this]) { obj[this] = self.mimeTypes[this]; } }); if (data.unshift) { self.mimesCanMakeEmpty = Object.assign(obj, self.mimesCanMakeEmpty); } } }) .bind('themechange', function() { requestAnimationFrame(function() { self.trigger('uiresize'); }); }) ; // We listen and emit a sound on delete according to option if (true === this.options.sound) { this.bind('playsound', function(e) { var play = beeper.canPlayType && beeper.canPlayType('audio/wav; codecs="1"'), file = e.data && e.data.soundFile, source; // Reject non-wav / path-traversal / HTML-breakout soundFile values (DOM XSS) if (!(play && file && play != '' && play != 'no')) { return; } if (typeof file !== 'string' || !/^[A-Za-z0-9._-]+\.wav$/.test(file)) { return; } beeper.innerHTML = ''; source = document.createElement('source'); source.src = soundPath + file; source.type = 'audio/wav'; beeper.appendChild(source); beeper.play(); }); } // bind external event handlers $.each(this.options.handlers, function(event, callback) { self.bind(event, callback); }); /** * History object. Store visited folders * * @type Object **/ this.history = new this.history(this); /** * Root hashed * * @type Object */ this.roots = {}; /** * leaf roots * * @type Object */ this.leafRoots = {}; this.volumeExpires = {}; /** * Loaded commands * * @type Object **/ this._commands = {}; if (!Array.isArray(this.options.commands)) { this.options.commands = []; } if ($.inArray('*', this.options.commands) !== -1) { this.options.commands = Object.keys(this.commands); } /** * UI command map of cwd volume ( That volume driver option `uiCmdMap` ) * * @type Object **/ this.commandMap = {}; /** * cwd options of each volume * key: volumeid * val: options object * * @type Object */ this.volOptions = {}; /** * Has volOptions data * * @type Boolean */ this.hasVolOptions = false; /** * Hash of trash holders * key: trash folder hash * val: source volume hash * * @type Object */ this.trashes = {}; /** * cwd options of each folder/file * key: hash * val: options object * * @type Object */ this.optionsByHashes = {}; /** * UI Auto Hide Functions * Each auto hide function mast be call to `fm.trigger('uiautohide')` at end of process * * @type Array **/ this.uiAutoHide = []; // trigger `uiautohide` this.one('open', function() { if (self.uiAutoHide.length) { setTimeout(function() { self.trigger('uiautohide'); }, 500); } }); // Auto Hide Functions sequential processing start this.bind('uiautohide', function() { if (self.uiAutoHide.length) { self.uiAutoHide.shift()(); } }); if (this.options.width) { width = this.options.width; } if (this.options.height) { height = this.options.height; } if (this.options.heightBase) { heightBase = $(this.options.heightBase); } if (this.options.soundPath) { soundPath = this.options.soundPath.replace(/\/+$/, '') + '/'; } else { soundPath = this.baseUrl + soundPath; } if (this.options.parrotHeaders && Array.isArray(this.options.parrotHeaders) && this.options.parrotHeaders.length) { this.parrotHeaders = this.options.parrotHeaders; // check sessionStorage $.each(this.parrotHeaders, function(i, h) { var v = self.sessionStorage('core-ph:' + h); if (v) { self.customHeaders[h] = v; } }); } else { this.parrotHeaders = []; } self.one('opendone', function() { var tm; // attach events to document $(document) // disable elfinder on click outside elfinder .on('click.'+namespace, function(e) { enabled && ! self.options.enableAlways && !$(e.target).closest(node).length && self.disable(); }) // exec shortcuts .on(keydown+' '+keypress+' '+keyup+' '+mousedown, execShortcut); // attach events to window self.options.useBrowserHistory && $(window) .on('popstate.' + namespace, function(ev) { var state = ev.originalEvent.state || {}, hasThash = state.thash? true : false, dialog = node.find('.elfinder-frontmost:visible'), input = node.find('.elfinder-navbar-dir,.elfinder-cwd-filename').find('input,textarea'), onOpen, toast; if (!hasThash) { state = { thash: self.cwd().hash }; // scroll to elFinder node $('html,body').animate({ scrollTop: node.offset().top }); } if (dialog.length || input.length) { history.pushState(state, null, location.pathname + location.search + '#elf_' + state.thash); if (dialog.length) { if (!dialog.hasClass(self.res('class', 'preventback'))) { if (dialog.hasClass('elfinder-contextmenu')) { $(document).trigger($.Event('keydown', { keyCode: $.ui.keyCode.ESCAPE, ctrlKey : false, shiftKey : false, altKey : false, metaKey : false })); } else if (dialog.hasClass('elfinder-dialog')) { dialog.elfinderdialog('close'); } else { dialog.trigger('close'); } } } else { input.trigger($.Event('keydown', { keyCode: $.ui.keyCode.ESCAPE, ctrlKey : false, shiftKey : false, altKey : false, metaKey : false })); } } else { if (hasThash) { !$.isEmptyObject(self.files()) && self.request({ data : {cmd : 'open', target : state.thash, onhistory : 1}, notify : {type : 'open', cnt : 1, hideCnt : true}, syncOnFail : true }); } else { onOpen = function() { toast.trigger('click'); }; self.one('open', onOpen, true); toast = self.toast({ msg: self.i18n('pressAgainToExit'), onHidden: function() { self.unbind('open', onOpen); history.pushState(state, null, location.pathname + location.search + '#elf_' + state.thash); } }); } } }); $(window).on('resize.' + namespace, function(e){ if (e.target === this) { tm && cancelAnimationFrame(tm); tm = requestAnimationFrame(function() { var prv = node.data('resizeSize') || {w: 0, h: 0}, size = {w: Math.round(node.width()), h: Math.round(node.height())}; node.data('resizeSize', size); if (size.w !== prv.w || size.h !== prv.h) { node.trigger('resize'); self.trigger('resize', {width : size.w, height : size.h}); } }); } }) .on('beforeunload.' + namespace,function(e){ var msg, cnt; if (!self.pauseUnloadCheck()) { if (node.is(':visible')) { if (self.ui.notify.children().length && $.inArray('hasNotifyDialog', self.options.windowCloseConfirm) !== -1) { msg = self.i18n('ntfsmth'); } else if (node.find('.'+self.res('class', 'editing')).length && $.inArray('editingFile', self.options.windowCloseConfirm) !== -1) { msg = self.i18n('editingFile'); } else if ((cnt = Object.keys(self.selected()).length) && $.inArray('hasSelectedItem', self.options.windowCloseConfirm) !== -1) { msg = self.i18n('hasSelected', ''+cnt); } else if ((cnt = Object.keys(self.clipboard()).length) && $.inArray('hasClipboardData', self.options.windowCloseConfirm) !== -1) { msg = self.i18n('hasClipboard', ''+cnt); } if (msg) { e.returnValue = msg; return msg; } } self.trigger('unload'); } }); // bind window onmessage for CORS $(window).on('message.' + namespace, function(e){ var res = e.originalEvent || null, obj, data, bind, trusted = {}; // Exact-origin match only (prefix indexOf check allowed origin bypass) try { trusted[new URL(self.convAbsUrl(self.options.url)).origin] = true; } catch (ignore) {} try { trusted[new URL(self.convAbsUrl(self.uploadURL)).origin] = true; } catch (ignore) {} if (res && res.origin && trusted[res.origin]) { try { try { if (typeof res.data !== 'string') { return; } obj = JSON.parse(res.data); if (obj.type !== "io.studio-42.github") { return; } data = obj.data || null; } catch (e2) { return; } if (data) { bind = obj.bind; if (bind && !/^[a-zA-Z0-9._-]+$/.test(bind)) { bind = ''; } if (data.error) { if (bind) { self.trigger(bind+'fail', data); } self.error(data.error); } else { data.warning && self.error(data.warning); self.updateCache(data); data.removed && data.removed.length && self.remove(data); data.added && data.added.length && self.add(data); data.changed && data.changed.length && self.change(data); if (bind) { self.trigger(bind, data); self.trigger(bind+'done'); } data.sync && self.sync(); } } } catch (e) { self.sync(); } } }); // elFinder enable always if (self.options.enableAlways) { $(window).on('focus.' + namespace, function(e){ (e.target === this) && self.enable(); }); if (inFrame) { $(window.top).on('focus.' + namespace, function() { if (self.enable() && (! parentIframe || parentIframe.is(':visible'))) { requestAnimationFrame(function() { $(window).trigger('focus'); }); } }); } } else if (inFrame) { $(window).on('blur.' + namespace, function(e){ enabled && e.target === this && self.disable(); }); } // return focus to the window on click (elFInder in the frame) if (inFrame) { node.on('click', function(e) { $(window).trigger('focus'); }); } // elFinder to enable by mouse over if (self.options.enableByMouseOver) { node.on('mouseenter touchstart', function(e) { (inFrame) && $(window).trigger('focus'); ! self.enabled() && self.enable(); }); } // When the browser tab turn to foreground/background $(window).on('visibilitychange.' + namespace, function(e) { var background = document.hidden || document.webkitHidden || document.msHidden; // AutoSync turn On/Off if (self.options.syncStart) { self.autoSync(background? 'stop' : void(0)); } }); }); // store instance in node node[0].elfinder = this; // auto load language file dfrdsBeforeBootup.push((function() { var lang = self.lang, langJs = self.i18nBaseUrl + 'elfinder.' + lang + '.js', dfd = $.Deferred().done(function() { if (self.i18[lang]) { self.lang = lang; } self.trigger('i18load'); i18n = self.lang === 'en' ? self.i18['en'] : $.extend(true, {}, self.i18['en'], self.i18[self.lang]); }); if (!self.i18[lang]) { self.lang = 'en'; if (self.hasRequire) { require([langJs], function() { dfd.resolve(); }, function() { dfd.resolve(); }); } else { self.loadScript([langJs], function() { dfd.resolve(); }, { loadType: 'tag', error : function() { dfd.resolve(); } }); } } else { dfd.resolve(); } return dfd; })()); // elFinder boot up function bootUp = function() { var columnNames; /** * i18 messages * * @type Object **/ self.messages = i18n.messages; // check jquery ui if (!($.fn.selectable && $.fn.draggable && $.fn.droppable && $.fn.resizable && $.fn.button && $.fn.slider)) { return alert(self.i18n('errJqui')); } // check node if (!node.length) { return alert(self.i18n('errNode')); } // check connector url if (!self.options.url) { return alert(self.i18n('errURL')); } // column key/name map for fm.getColumnName() columnNames = Object.assign({ name : self.i18n('name'), perm : self.i18n('perms'), date : self.i18n('modify'), size : self.i18n('size'), kind : self.i18n('kind'), modestr : self.i18n('mode'), modeoct : self.i18n('mode'), modeboth : self.i18n('mode') }, self.options.uiOptions.cwd.listView.columnsCustomName); /** * Gets the column name of cwd list view * * @param String key The key * @return String The column name. */ self.getColumnName = function(key) { var res = columnNames[key] || self.i18n(key); return typeof res === 'function'? res() : res; }; /** * Interface direction * * @type String * @default "ltr" **/ self.direction = i18n.direction; /** * Date/time format * * @type String * @default "m.d.Y" **/ self.dateFormat = self.options.dateFormat || i18n.dateFormat; /** * Date format like "Yesterday 10:20:12" * * @type String * @default "{day} {time}" **/ self.fancyFormat = self.options.fancyDateFormat || i18n.fancyDateFormat; /** * Date format for if upload file has not original unique name * e.g. Clipboard image data, Image data taken with iOS * * @type String * @default "ymd-His" **/ self.nonameDateFormat = (self.options.nonameDateFormat || i18n.nonameDateFormat).replace(/[\/\\]/g, '_'); /** * Css classes * * @type String **/ self.cssClass = 'ui-helper-reset ui-helper-clearfix ui-widget ui-widget-content ui-corner-all elfinder elfinder-' +(self.direction == 'rtl' ? 'rtl' : 'ltr') +(self.UA.Touch? (' elfinder-touch' + (self.options.resizable ? ' touch-punch' : '')) : '') +(self.UA.Mobile? ' elfinder-mobile' : '') +(self.UA.iOS? ' elfinder-ios' : '') +' '+self.options.cssClass; // prepare node node.addClass(self.cssClass) .on(mousedown, function() { !enabled && self.enable(); }); // draggable closure (function() { var ltr, wzRect, wzBottom, wzBottom2, nodeStyle, keyEvt = keydown + 'draggable' + ' keyup.' + namespace + 'draggable'; /** * Base draggable options * * @type Object **/ self.draggable = { appendTo : node, addClasses : false, distance : 4, revert : true, refreshPositions : false, cursor : 'crosshair', cursorAt : {left : 50, top : 47}, scroll : false, start : function(e, ui) { var helper = ui.helper, targets = $.grep(helper.data('files')||[], function(h) { if (h) { remember[h] = true; return true; } return false; }), locked = false, cnt, h; // fix node size nodeStyle = node.attr('style'); node.width(node.width()).height(node.height()); // set var for drag() ltr = (self.direction === 'ltr'); wzRect = self.getUI('workzone').data('rectangle'); wzBottom = wzRect.top + wzRect.height; wzBottom2 = wzBottom - self.getUI('navdock').outerHeight(true); self.draggingUiHelper = helper; cnt = targets.length; while (cnt--) { h = targets[cnt]; if (files[h].locked) { locked = true; helper.data('locked', true); break; } } !locked && self.trigger('lockfiles', {files : targets}); helper.data('autoScrTm', setInterval(function() { if (helper.data('autoScr')) { self.autoScroll[helper.data('autoScr')](helper.data('autoScrVal')); } }, 50)); }, drag : function(e, ui) { var helper = ui.helper, autoScr, autoUp, bottom; if ((autoUp = wzRect.top > e.pageY) || wzBottom2 < e.pageY) { if (wzRect.cwdEdge > e.pageX) { autoScr = (ltr? 'navbar' : 'cwd') + (autoUp? 'Up' : 'Down'); } else { autoScr = (ltr? 'cwd' : 'navbar') + (autoUp? 'Up' : 'Down'); } if (!autoUp) { if (autoScr.substr(0, 3) === 'cwd') { if (wzBottom < e.pageY) { bottom = wzBottom; } else { autoScr = null; } } else { bottom = wzBottom2; } } if (autoScr) { helper.data('autoScr', autoScr); helper.data('autoScrVal', Math.pow((autoUp? wzRect.top - e.pageY : e.pageY - bottom), 1.3)); } } if (! autoScr) { if (helper.data('autoScr')) { helper.data('refreshPositions', 1).data('autoScr', null); } } if (helper.data('refreshPositions') && $(this).elfUiWidgetInstance('draggable')) { if (helper.data('refreshPositions') > 0) { $(this).draggable('option', { refreshPositions : true, elfRefresh : true }); helper.data('refreshPositions', -1); } else { $(this).draggable('option', { refreshPositions : false, elfRefresh : false }); helper.data('refreshPositions', null); } } }, stop : function(e, ui) { var helper = ui.helper, files; $(document).off(keyEvt); $(this).elfUiWidgetInstance('draggable') && $(this).draggable('option', { refreshPositions : false }); self.draggingUiHelper = null; self.trigger('focus').trigger('dragstop'); if (! helper.data('droped')) { files = $.grep(helper.data('files')||[], function(h) { return h? true : false ;}); self.trigger('unlockfiles', {files : files}); self.trigger('selectfiles', {files : self.selected()}); } self.enable(); // restore node style node.attr('style', nodeStyle); helper.data('autoScrTm') && clearInterval(helper.data('autoScrTm')); }, helper : function(e, ui) { var element = this.id ? $(this) : $(this).parents('[id]:first'), helper = $('
'), icon = function(f) { var mime = f.mime, i, tmb = self.tmb(f); i = '
'; if (tmb) { i = $(i).addClass(tmb.className).css('background-image', "url('"+tmb.url+"')").get(0).outerHTML; } else if (f.icon) { i = $(i).css(self.getIconStyle(f, true)).get(0).outerHTML; } if (f.csscls) { i = '
' + i + '
'; } return i; }, hashes, l, ctr; self.draggingUiHelper && self.draggingUiHelper.stop(true, true); self.trigger('dragstart', {target : element[0], originalEvent : e}, true); hashes = element.hasClass(self.res('class', 'cwdfile')) ? self.selected() : [self.navId2Hash(element.attr('id'))]; helper.append(icon(files[hashes[0]])).data('files', hashes).data('locked', false).data('droped', false).data('namespace', namespace).data('dropover', 0); if ((l = hashes.length) > 1) { helper.append(icon(files[hashes[l-1]]) + ''+l+''); } $(document).on(keyEvt, function(e){ if (self._commands.copy) { var chk = (e.shiftKey||e.ctrlKey||e.metaKey); if (ctr !== chk) { ctr = chk; if (helper.is(':visible') && helper.data('dropover') && ! helper.data('droped')) { helper.toggleClass('elfinder-drag-helper-plus', helper.data('locked')? true : ctr); self.trigger(ctr? 'unlockfiles' : 'lockfiles', {files : hashes, helper: helper}); } } } }); return helper; } }; })(); // in getFileCallback set - change default actions on double click/enter/ctrl+enter if (self.commands.getfile) { if (typeof(self.options.getFileCallback) == 'function') { self.bind('dblclick', function(e) { e.preventDefault(); self.exec('getfile').fail(function() { self.exec('open', e.data && e.data.file? [ e.data.file ]: void(0)); }); }); self.shortcut({ pattern : 'enter', description : self.i18n('cmdgetfile'), callback : function() { self.exec('getfile').fail(function() { self.exec(self.OS == 'mac' ? 'rename' : 'open'); }); } }) .shortcut({ pattern : 'ctrl+enter', description : self.i18n(self.OS == 'mac' ? 'cmdrename' : 'cmdopen'), callback : function() { self.exec(self.OS == 'mac' ? 'rename' : 'open'); } }); } else { self.options.getFileCallback = null; } } // load commands $.each(self.commands, function(name, cmd) { var proto = Object.assign({}, cmd.prototype), extendsCmd, opts; if (typeof cmd === 'function' && !self._commands[name] && (cmd.prototype.forceLoad || $.inArray(name, self.options.commands) !== -1)) { extendsCmd = cmd.prototype.extendsCmd || ''; if (extendsCmd) { if (typeof self.commands[extendsCmd] === 'function') { cmd.prototype = Object.assign({}, base, new self.commands[extendsCmd](), cmd.prototype); } else { return true; } } else { cmd.prototype = Object.assign({}, base, cmd.prototype); } self._commands[name] = new cmd(); cmd.prototype = proto; opts = self.options.commandsOptions[name] || {}; if (extendsCmd && self.options.commandsOptions[extendsCmd]) { opts = $.extend(true, {}, self.options.commandsOptions[extendsCmd], opts); } self._commands[name].setup(name, opts); // setup linked commands if (self._commands[name].linkedCmds.length) { $.each(self._commands[name].linkedCmds, function(i, n) { var lcmd = self.commands[n]; if (typeof lcmd === 'function' && !self._commands[n]) { lcmd.prototype = base; self._commands[n] = new lcmd(); self._commands[n].setup(n, self.options.commandsOptions[n]||{}); } }); } } }); /** * UI nodes * * @type Object **/ self.ui = { // container for nav panel and current folder container workzone : $('
').appendTo(node).elfinderworkzone(self), // contaainer for folders tree / places navbar : $('
').appendTo(node).elfindernavbar(self, self.options.uiOptions.navbar || {}), // container for for preview etc at below the navbar navdock : $('
').appendTo(node).elfindernavdock(self, self.options.uiOptions.navdock || {}), // contextmenu contextmenu : $('
').appendTo(node).elfindercontextmenu(self), // overlay overlay : $('
').appendTo(node).elfinderoverlay({ show : function() { self.disable(); }, hide : function() { prevEnabled && self.enable(); } }), // current folder container cwd : $('
').appendTo(node).elfindercwd(self, self.options.uiOptions.cwd || {}), // notification dialog window notify : self.dialog('', { cssClass : 'elfinder-dialog-notify' + (self.options.notifyDialog.canClose? '' : ' elfinder-titlebar-button-hide'), position : self.options.notifyDialog.position, absolute : true, resizable : false, autoOpen : false, allowMinimize : true, closeOnEscape : self.options.notifyDialog.canClose? true : false, title : ' ', width : self.options.notifyDialog.width? parseInt(self.options.notifyDialog.width) : null, minHeight : null, minimize : function() { self.ui.notify.trigger('minimize'); } }), statusbar : $('
').hide().appendTo(node), toast : $('
').appendTo(node), bottomtray : $('
').appendTo(node), progressbar : $('
').appendTo(node) }; self.trigger('uiready'); // load required ui $.each(self.options.ui || [], function(i, ui) { var name = 'elfinder'+ui, opts = self.options.uiOptions[ui] || {}; if (!self.ui[ui] && $.fn[name]) { // regist to self.ui before make instance self.ui[ui] = $('<'+(opts.tag || 'div')+'/>').appendTo(node); self.ui[ui][name](self, opts); } }); self.ui.progressbar.appendTo(self.ui.workzone); self.ui.notify.prev('.ui-dialog-titlebar').append('
'); // update size self.resize(width, height); // make node resizable if (self.options.resizable) { node.resizable({ resize : function(e, ui) { self.resize(ui.size.width, ui.size.height); }, handles : 'se', minWidth : 300, minHeight : 200 }); if (self.UA.Touch) { node.addClass('touch-punch'); } } (function() { var navbar = self.getUI('navbar'), cwd = self.getUI('cwd').parent(); self.autoScroll = { navbarUp : function(v) { navbar.scrollTop(Math.max(0, navbar.scrollTop() - v)); }, navbarDown : function(v) { navbar.scrollTop(navbar.scrollTop() + v); }, cwdUp : function(v) { cwd.scrollTop(Math.max(0, cwd.scrollTop() - v)); }, cwdDown : function(v) { cwd.scrollTop(cwd.scrollTop() + v); } }; })(); // Swipe on the touch devices to show/hide of toolbar or navbar if (self.UA.Touch) { (function() { var lastX, lastY, nodeOffset, nodeWidth, nodeTop, navbarW, toolbarH, navbar = self.getUI('navbar'), toolbar = self.getUI('toolbar'), moveEv = 'touchmove.stopscroll', moveTm, moveUpOn = function(e) { var touches = e.originalEvent.touches || [{}], y = touches[0].pageY || null; if (!lastY || y < lastY) { e.preventDefault(); moveTm && clearTimeout(moveTm); } }, moveDownOn = function(e) { e.preventDefault(); moveTm && clearTimeout(moveTm); }, moveOff = function() { moveTm = setTimeout(function() { node.off(moveEv); }, 100); }, handleW, handleH = 50; navbar = navbar.children().length? navbar : null; toolbar = toolbar.length? toolbar : null; node.on('touchstart touchmove touchend', function(e) { if (e.type === 'touchend') { lastX = false; lastY = false; moveOff(); return; } var touches = e.originalEvent.touches || [{}], x = touches[0].pageX || null, y = touches[0].pageY || null, ltr = (self.direction === 'ltr'), navbarMode, treeWidth, swipeX, moveX, toolbarT, mode; if (x === null || y === null || (e.type === 'touchstart' && touches.length > 1)) { return; } if (e.type === 'touchstart') { nodeOffset = node.offset(); nodeWidth = node.width(); if (navbar) { lastX = false; if (navbar.is(':hidden')) { if (! handleW) { handleW = Math.max(50, nodeWidth / 10); } if ((ltr? (x - nodeOffset.left) : (nodeWidth + nodeOffset.left - x)) < handleW) { lastX = x; } } else if (! e.originalEvent._preventSwipeX) { navbarW = navbar.width(); if (ltr) { swipeX = (x < nodeOffset.left + navbarW); } else { swipeX = (x > nodeOffset.left + nodeWidth - navbarW); } if (swipeX) { handleW = Math.max(50, nodeWidth / 10); lastX = x; } else { lastX = false; } } } if (toolbar) { lastY = false; if (! e.originalEvent._preventSwipeY) { toolbarH = toolbar.height(); nodeTop = nodeOffset.top; if (y - nodeTop < (toolbar.is(':hidden')? handleH : (toolbarH + 30))) { lastY = y; node.on(moveEv, toolbar.is(':hidden')? moveDownOn: moveUpOn); } } } } else { if (navbar && lastX !== false) { navbarMode = (ltr? (lastX > x) : (lastX < x))? 'navhide' : 'navshow'; moveX = Math.abs(lastX - x); if (navbarMode === 'navhide' && moveX > navbarW * 0.6 || (moveX > (navbarMode === 'navhide'? navbarW / 3 : 45) && (navbarMode === 'navshow' || (ltr? x < nodeOffset.left + 20 : x > nodeOffset.left + nodeWidth - 20) )) ) { self.getUI('navbar').trigger(navbarMode, {handleW: handleW}); lastX = false; } } if (toolbar && lastY !== false ) { toolbarT = toolbar.offset().top; if (Math.abs(lastY - y) > Math.min(45, toolbarH / 3)) { mode = (lastY > y)? 'slideUp' : 'slideDown'; if (mode === 'slideDown' || toolbarT + 20 > y) { if (toolbar.is(mode === 'slideDown' ? ':hidden' : ':visible')) { toolbar.stop(true, true).trigger('toggle', {duration: 100, handleH: handleH}); } lastY = false; } } } } }); })(); } if (self.dragUpload) { // add event listener for HTML5 DnD upload (function() { var isin = function(e) { return (e.target.nodeName !== 'TEXTAREA' && e.target.nodeName !== 'INPUT' && $(e.target).closest('div.ui-dialog-content').length === 0); }, ent = 'native-drag-enter', disable = 'native-drag-disable', c = 'class', navdir = self.res(c, 'navdir'), droppable = self.res(c, 'droppable'), dropover = self.res(c, 'adroppable'), arrow = self.res(c, 'navarrow'), clDropActive = self.res(c, 'adroppable'), wz = self.getUI('workzone'), ltr = (self.direction === 'ltr'), clearTm = function() { autoScrTm && cancelAnimationFrame(autoScrTm); autoScrTm = null; }, wzRect, autoScrFn, autoScrTm; node.on('dragenter', function(e) { clearTm(); if (isin(e)) { e.preventDefault(); e.stopPropagation(); wzRect = wz.data('rectangle'); } }) .on('dragleave', function(e) { clearTm(); if (isin(e)) { e.preventDefault(); e.stopPropagation(); } }) .on('dragover', function(e) { var autoUp; if (isin(e)) { e.preventDefault(); e.stopPropagation(); e.originalEvent.dataTransfer.dropEffect = 'none'; if (! autoScrTm) { autoScrTm = requestAnimationFrame(function() { var wzBottom = wzRect.top + wzRect.height, wzBottom2 = wzBottom - self.getUI('navdock').outerHeight(true), fn; if ((autoUp = e.pageY < wzRect.top) || e.pageY > wzBottom2 ) { if (wzRect.cwdEdge > e.pageX) { fn = (ltr? 'navbar' : 'cwd') + (autoUp? 'Up' : 'Down'); } else { fn = (ltr? 'cwd' : 'navbar') + (autoUp? 'Up' : 'Down'); } if (!autoUp) { if (fn.substr(0, 3) === 'cwd') { if (wzBottom < e.pageY) { wzBottom2 = wzBottom; } else { fn = ''; } } } fn && self.autoScroll[fn](Math.pow((autoUp? wzRect.top - e.pageY : e.pageY - wzBottom2), 1.3)); } autoScrTm = null; }); } } else { clearTm(); } }) .on('drop', function(e) { clearTm(); if (isin(e)) { e.stopPropagation(); e.preventDefault(); } }); node.on('dragenter', '.native-droppable', function(e){ if (e.originalEvent.dataTransfer) { var $elm = $(e.currentTarget), id = e.currentTarget.id || null, cwd = null, elfFrom; if (!id) { // target is cwd cwd = self.cwd(); $elm.data(disable, false); try { $.each(e.originalEvent.dataTransfer.types, function(i, v){ if (v.substr(0, 13) === 'elfinderfrom:') { elfFrom = v.substr(13).toLowerCase(); } }); } catch(e) {} } if (!cwd || (cwd.write && (!elfFrom || elfFrom !== (window.location.href + cwd.hash).toLowerCase()))) { e.preventDefault(); e.stopPropagation(); $elm.data(ent, true); $elm.addClass(clDropActive); } else { $elm.data(disable, true); } } }) .on('dragleave', '.native-droppable', function(e){ if (e.originalEvent.dataTransfer) { var $elm = $(e.currentTarget); e.preventDefault(); e.stopPropagation(); if ($elm.data(ent)) { $elm.data(ent, false); } else { $elm.removeClass(clDropActive); } } }) .on('dragover', '.native-droppable', function(e){ if (e.originalEvent.dataTransfer) { var $elm = $(e.currentTarget); e.preventDefault(); e.stopPropagation(); e.originalEvent.dataTransfer.dropEffect = $elm.data(disable)? 'none' : 'copy'; $elm.data(ent, false); } }) .on('drop', '.native-droppable', function(e){ if (e.originalEvent && e.originalEvent.dataTransfer) { var $elm = $(e.currentTarget), id; e.preventDefault(); e.stopPropagation(); $elm.removeClass(clDropActive); if (e.currentTarget.id) { id = $elm.hasClass(navdir)? self.navId2Hash(e.currentTarget.id) : self.cwdId2Hash(e.currentTarget.id); } else { id = self.cwd().hash; } e.originalEvent._target = id; self.exec('upload', {dropEvt: e.originalEvent, target: id}, void 0, id); } }); })(); } // trigger event cssloaded if cssAutoLoad disabled if (self.cssloaded === false) { self.cssloaded = true; self.trigger('cssloaded'); } // calculate elFinder node z-index self.zIndexCalc(); // send initial request and start to pray >_< self.trigger('init') .request({ data : {cmd : 'open', target : self.startDir(), init : 1, tree : 1}, preventDone : true, notify : {type : 'open', cnt : 1, hideCnt : true}, freeze : true }) .fail(function() { self.trigger('fail').disable().lastDir(''); listeners = {}; shortcuts = {}; $(document).add(node).off('.'+namespace); self.trigger = function() { }; }) .done(function(data) { var trashDisable = function(th) { var src = self.file(self.trashes[th]), d = self.options.debug, error; if (src && src.volumeid) { delete self.volOptions[src.volumeid].trashHash; } self.trashes[th] = false; self.debug('backend-error', 'Trash hash "'+th+'" was not found or not writable.'); }, toChkTh = {}; // regist rawStringDecoder if (self.options.rawStringDecoder) { self.registRawStringDecoder(self.options.rawStringDecoder); } // re-calculate elFinder node z-index self.zIndexCalc(); self.load().debug('api', self.api); // update ui's size after init node.trigger('resize'); // initial open open(data); self.trigger('open', data, false); self.trigger('opendone'); if (inFrame && self.options.enableAlways) { $(window).trigger('focus'); } // check self.trashes $.each(self.trashes, function(th) { var dir = self.file(th), src; if (! dir) { toChkTh[th] = true; } else if (dir.mime !== 'directory' || ! dir.write) { trashDisable(th); } }); if (Object.keys(toChkTh).length) { self.request({ data : {cmd : 'info', targets : Object.keys(toChkTh)}, preventDefault : true }).done(function(data) { if (data && data.files) { $.each(data.files, function(i, dir) { if (dir.mime === 'directory' && dir.write) { delete toChkTh[dir.hash]; } }); } }).always(function() { $.each(toChkTh, trashDisable); }); } // to enable / disable self[self.options.enableAlways? 'enable' : 'disable'](); }); // self.timeEnd('load'); // End of bootUp() }; // call bootCallback function with elFinder instance, extraObject - { dfrdsBeforeBootup: dfrdsBeforeBootup } if (bootCallback && typeof bootCallback === 'function') { self.bootCallback = bootCallback; bootCallback.call(node.get(0), self, { dfrdsBeforeBootup: dfrdsBeforeBootup }); } // call dfrdsBeforeBootup functions then boot up elFinder $.when.apply(null, dfrdsBeforeBootup).done(function() { bootUp(); }).fail(function(error) { self.error(error); }); }; //register elFinder to global scope if (typeof toGlobal === 'undefined' || toGlobal) { window.elFinder = elFinder; } /** * Prototype * * @type Object */ elFinder.prototype = { uniqueid : 0, res : function(type, id) { return this.resources[type] && this.resources[type][id]; }, /** * User os. Required to bind native shortcuts for open/rename * * @type String **/ OS : navigator.userAgent.indexOf('Mac') !== -1 ? 'mac' : navigator.userAgent.indexOf('Win') !== -1 ? 'win' : 'other', /** * User browser UA. * jQuery.browser: version deprecated: 1.3, removed: 1.9 * * @type Object **/ UA : (function(){ var self = this, webkit = !document.unqueID && !window.opera && !window.sidebar && 'localStorage' in window && 'WebkitAppearance' in document.documentElement.style, chrome = webkit && window.chrome, /*setRotated = function() { var a = ((screen && screen.orientation && screen.orientation.angle) || window.orientation || 0) + 0; if (a === -90) { a = 270; } UA.Angle = a; UA.Rotated = a % 180 === 0? false : true; },*/ UA = { // Browser IE <= IE 6 ltIE6 : typeof window.addEventListener == "undefined" && typeof document.documentElement.style.maxHeight == "undefined", // Browser IE <= IE 7 ltIE7 : typeof window.addEventListener == "undefined" && typeof document.querySelectorAll == "undefined", // Browser IE <= IE 8 ltIE8 : typeof window.addEventListener == "undefined" && typeof document.getElementsByClassName == "undefined", // Browser IE <= IE 9 ltIE9 : document.uniqueID && document.documentMode <= 9, // Browser IE <= IE 10 ltIE10 : document.uniqueID && document.documentMode <= 10, // Browser IE >= IE 11 gtIE11 : document.uniqueID && document.documentMode >= 11, IE : document.uniqueID, Firefox : window.sidebar, Opera : window.opera, Webkit : webkit, Chrome : chrome, Edge : (chrome && window.msCredentials)? true : false, Safari : webkit && !window.chrome, Mobile : typeof window.orientation != "undefined", Touch : typeof window.ontouchstart != "undefined", iOS : navigator.platform.match(/^iP(?:[ao]d|hone)/), Mac : navigator.platform.match(/^Mac/), Fullscreen : (typeof (document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen || document.msExitFullscreen) !== 'undefined'), Angle : 0, Rotated : false, CSS : (function() { var aStyle = document.createElement('a').style, pStyle = document.createElement('p').style, css; css = 'position:sticky;position:-webkit-sticky;'; css += 'width:-webkit-max-content;width:-moz-max-content;width:-ms-max-content;width:max-content;'; aStyle.cssText = css; return { positionSticky : aStyle.position.indexOf('sticky')!==-1, widthMaxContent : aStyle.width.indexOf('max-content')!==-1, flex : typeof pStyle.flex !== 'undefined' }; })() }; return UA; })(), /** * Is cookie enabled * * @type Boolean */ cookieEnabled : window.navigator.cookieEnabled, /** * Has RequireJS? * * @type Boolean */ hasRequire : (typeof define === 'function' && define.amd), /** * Current request command * * @type String */ currentReqCmd : '', /** * Current keyboard state * * @type Object */ keyState : {}, /** * Internationalization object * * @type Object */ i18 : { en : { translator : '', language : 'English', direction : 'ltr', dateFormat : 'd.m.Y H:i', fancyDateFormat : '$1 H:i', nonameDateFormat : 'ymd-His', messages : {} }, months : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], monthsShort : ['msJan', 'msFeb', 'msMar', 'msApr', 'msMay', 'msJun', 'msJul', 'msAug', 'msSep', 'msOct', 'msNov', 'msDec'], days : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], daysShort : ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] }, /** * File mimetype to kind mapping * * @type Object */ kinds : { 'unknown' : 'Unknown', 'directory' : 'Folder', 'group' : 'Selects', 'symlink' : 'Alias', 'symlink-broken' : 'AliasBroken', 'application/x-empty' : 'TextPlain', 'application/postscript' : 'Postscript', 'application/vnd.ms-office' : 'MsOffice', 'application/msword' : 'MsWord', 'application/vnd.ms-word' : 'MsWord', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' : 'MsWord', 'application/vnd.ms-word.document.macroEnabled.12' : 'MsWord', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' : 'MsWord', 'application/vnd.ms-word.template.macroEnabled.12' : 'MsWord', 'application/vnd.ms-excel' : 'MsExcel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' : 'MsExcel', 'application/vnd.ms-excel.sheet.macroEnabled.12' : 'MsExcel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' : 'MsExcel', 'application/vnd.ms-excel.template.macroEnabled.12' : 'MsExcel', 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' : 'MsExcel', 'application/vnd.ms-excel.addin.macroEnabled.12' : 'MsExcel', 'application/vnd.ms-powerpoint' : 'MsPP', 'application/vnd.openxmlformats-officedocument.presentationml.presentation' : 'MsPP', 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' : 'MsPP', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' : 'MsPP', 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' : 'MsPP', 'application/vnd.openxmlformats-officedocument.presentationml.template' : 'MsPP', 'application/vnd.ms-powerpoint.template.macroEnabled.12' : 'MsPP', 'application/vnd.ms-powerpoint.addin.macroEnabled.12' : 'MsPP', 'application/vnd.openxmlformats-officedocument.presentationml.slide' : 'MsPP', 'application/vnd.ms-powerpoint.slide.macroEnabled.12' : 'MsPP', 'application/pdf' : 'PDF', 'application/xml' : 'XML', 'application/vnd.oasis.opendocument.text' : 'OO', 'application/vnd.oasis.opendocument.text-template' : 'OO', 'application/vnd.oasis.opendocument.text-web' : 'OO', 'application/vnd.oasis.opendocument.text-master' : 'OO', 'application/vnd.oasis.opendocument.graphics' : 'OO', 'application/vnd.oasis.opendocument.graphics-template' : 'OO', 'application/vnd.oasis.opendocument.presentation' : 'OO', 'application/vnd.oasis.opendocument.presentation-template' : 'OO', 'application/vnd.oasis.opendocument.spreadsheet' : 'OO', 'application/vnd.oasis.opendocument.spreadsheet-template' : 'OO', 'application/vnd.oasis.opendocument.chart' : 'OO', 'application/vnd.oasis.opendocument.formula' : 'OO', 'application/vnd.oasis.opendocument.database' : 'OO', 'application/vnd.oasis.opendocument.image' : 'OO', 'application/vnd.openofficeorg.extension' : 'OO', 'application/x-shockwave-flash' : 'AppFlash', 'application/flash-video' : 'Flash video', 'application/x-bittorrent' : 'Torrent', 'application/javascript' : 'JS', 'application/rtf' : 'RTF', 'application/rtfd' : 'RTF', 'application/x-font-ttf' : 'TTF', 'application/x-font-otf' : 'OTF', 'application/x-rpm' : 'RPM', 'application/x-web-config' : 'TextPlain', 'application/xhtml+xml' : 'HTML', 'application/docbook+xml' : 'DOCBOOK', 'application/x-awk' : 'AWK', 'application/x-gzip' : 'GZIP', 'application/x-bzip2' : 'BZIP', 'application/x-xz' : 'XZ', 'application/zip' : 'ZIP', 'application/x-zip' : 'ZIP', 'application/x-rar' : 'RAR', 'application/x-tar' : 'TAR', 'application/x-7z-compressed' : '7z', 'application/x-jar' : 'JAR', 'text/plain' : 'TextPlain', 'text/x-php' : 'PHP', 'text/html' : 'HTML', 'text/javascript' : 'JS', 'text/css' : 'CSS', 'text/rtf' : 'RTF', 'text/rtfd' : 'RTF', 'text/x-c' : 'C', 'text/x-csrc' : 'C', 'text/x-chdr' : 'CHeader', 'text/x-c++' : 'CPP', 'text/x-c++src' : 'CPP', 'text/x-c++hdr' : 'CPPHeader', 'text/x-shellscript' : 'Shell', 'application/x-csh' : 'Shell', 'text/x-python' : 'Python', 'text/x-java' : 'Java', 'text/x-java-source' : 'Java', 'text/x-ruby' : 'Ruby', 'text/x-perl' : 'Perl', 'text/x-sql' : 'SQL', 'text/xml' : 'XML', 'text/x-comma-separated-values' : 'CSV', 'text/x-markdown' : 'Markdown', 'image/x-ms-bmp' : 'BMP', 'image/jpeg' : 'JPEG', 'image/gif' : 'GIF', 'image/png' : 'PNG', 'image/tiff' : 'TIFF', 'image/x-targa' : 'TGA', 'image/vnd.adobe.photoshop' : 'PSD', 'image/xbm' : 'XBITMAP', 'image/pxm' : 'PXM', 'image/webp' : 'WEBP', 'application/vnd.ms-fontobject' : 'EOT', 'font/sfnt' : 'SFNT', 'application/font-sfnt' : 'SFNT', 'font/ttf' : 'TTF', 'font/opentype' : 'OTF', 'font/otf' : 'OTF', 'application/x-font-opentype' : 'OTF', 'font/woff' : 'WOFF', 'application/font-woff' : 'WOFF', 'font/woff2' : 'WOFF2', 'application/font-woff2' : 'WOFF2', 'audio/mpeg' : 'AudioMPEG', 'audio/midi' : 'AudioMIDI', 'audio/ogg' : 'AudioOGG', 'audio/mp4' : 'AudioMPEG4', 'audio/x-m4a' : 'AudioMPEG4', 'audio/wav' : 'AudioWAV', 'audio/x-mp3-playlist' : 'AudioPlaylist', 'video/x-dv' : 'VideoDV', 'video/mp4' : 'VideoMPEG4', 'video/mpeg' : 'VideoMPEG', 'video/x-msvideo' : 'VideoAVI', 'video/quicktime' : 'VideoMOV', 'video/x-ms-wmv' : 'VideoWM', 'video/x-flv' : 'VideoFlash', 'video/x-matroska' : 'VideoMKV', 'video/ogg' : 'VideoOGG' }, /** * File mimetype to file extention mapping * * @type Object * @see elFinder.mimetypes.js */ mimeTypes : {}, /** * Ajax request data validation rules * * @type Object */ rules : { defaults : function(data) { if (!data || (data.added && !Array.isArray(data.added)) || (data.removed && !Array.isArray(data.removed)) || (data.changed && !Array.isArray(data.changed))) { return false; } return true; }, open : function(data) { return data && data.cwd && data.files && $.isPlainObject(data.cwd) && Array.isArray(data.files); }, tree : function(data) { return data && data.tree && Array.isArray(data.tree); }, parents : function(data) { return data && data.tree && Array.isArray(data.tree); }, tmb : function(data) { return data && data.images && ($.isPlainObject(data.images) || Array.isArray(data.images)); }, upload : function(data) { return data && ($.isPlainObject(data.added) || Array.isArray(data.added));}, search : function(data) { return data && data.files && Array.isArray(data.files); } }, /** * Commands costructors * * @type Object */ commands : {}, /** * Commands to add the item (space delimited) * * @type String */ cmdsToAdd : 'archive duplicate extract mkdir mkfile paste rm upload', parseUploadData : function(text) { var self = this, data; if (!text.trim()) { return {error : ['errResponse', 'errDataEmpty']}; } try { data = JSON.parse(text); } catch (e) { return {error : ['errResponse', 'errDataNotJSON']}; } data = self.normalize(data); if (!self.validResponse('upload', data)) { return {error : (data.norError || ['errResponse'])}; } data.removed = $.merge((data.removed || []), $.map(data.added || [], function(f) { return self.file(f.hash)? f.hash : null; })); return data; }, iframeCnt : 0, uploads : { // xhr muiti uploading flag xhrUploading: false, // Timer of request fail to sync failSyncTm: null, // current chunkfail requesting chunk chunkfailReq: {}, // check file/dir exists checkExists: function(files, target, fm, isDir) { var dfrd = $.Deferred(), names, renames = [], hashes = {}, chkFiles = [], cancel = function() { var i = files.length; while (--i > -1) { files[i]._remove = true; } }, resolve = function() { dfrd.resolve(renames, hashes); }, check = function() { var existed = [], exists = [], i, c, pathStr = target !== fm.cwd().hash? fm.path(target, true) + fm.option('separator', target) : '', confirm = function(ndx) { var last = ndx == exists.length-1, opts = { cssClass : 'elfinder-confirm-upload', title : fm.i18n('cmdupload'), text : ['errExists', pathStr + exists[ndx].name, 'confirmRepl'], all : !last, accept : { label : 'btnYes', callback : function(all) { !last && !all ? confirm(++ndx) : resolve(); } }, reject : { label : 'btnNo', callback : function(all) { var i; if (all) { i = exists.length; while (ndx < i--) { files[exists[i].i]._remove = true; } } else { files[exists[ndx].i]._remove = true; } !last && !all ? confirm(++ndx) : resolve(); } }, cancel : { label : 'btnCancel', callback : function() { cancel(); resolve(); } }, buttons : [ { label : 'btnBackup', cssClass : 'elfinder-confirm-btn-backup', callback : function(all) { var i; if (all) { i = exists.length; while (ndx < i--) { renames.push(exists[i].name); } } else { renames.push(exists[ndx].name); } !last && !all ? confirm(++ndx) : resolve(); } } ] }; if (!isDir) { opts.buttons.push({ label : 'btnRename' + (last? '' : 'All'), cssClass : 'elfinder-confirm-btn-rename', callback : function() { renames = null; resolve(); } }); } if (fm.iframeCnt > 0) { delete opts.reject; } fm.confirm(opts); }; if (! fm.file(target).read) { // for dropbox type resolve(); return; } names = $.map(files, function(file, i) { return file.name && (!fm.UA.iOS || file.name !== 'image.jpg')? {i: i, name: file.name} : null ;}); fm.request({ data : {cmd : 'ls', target : target, intersect : $.map(names, function(item) { return item.name;})}, notify : {type : 'preupload', cnt : 1, hideCnt : true}, preventDefault : true }) .done(function(data) { var existedArr, cwdItems; if (data) { if (data.error) { cancel(); } else { if (fm.options.overwriteUploadConfirm && fm.option('uploadOverwrite', target)) { if (data.list) { if (Array.isArray(data.list)) { existed = data.list || []; } else { existedArr = []; existed = $.map(data.list, function(n) { if (typeof n === 'string') { return n; } else { // support to >=2.1.11 plugin Normalizer, Sanitizer existedArr = existedArr.concat(n); return false; } }); if (existedArr.length) { existed = existed.concat(existedArr); } hashes = data.list; } exists = $.grep(names, function(name){ return $.inArray(name.name, existed) !== -1 ? true : false ; }); if (exists.length && existed.length && target == fm.cwd().hash) { cwdItems = $.map(fm.files(target), function(file) { return file.name; } ); if ($.grep(existed, function(n) { return $.inArray(n, cwdItems) === -1? true : false; }).length){ fm.sync(); } } } } } } if (exists.length > 0) { confirm(0); } else { resolve(); } }) .fail(function(error) { cancel(); resolve(); error && fm.error(error); }); }; if (fm.api >= 2.1 && typeof files[0] == 'object') { check(); } else { resolve(); } return dfrd; }, // check droped contents checkFile : function(data, fm, target) { if (!!data.checked || data.type == 'files') { return data.files; } else if (data.type == 'data') { var dfrd = $.Deferred(), scanDfd = $.Deferred(), files = [], paths = [], dirctorys = [], processing = 0, items, mkdirs = [], cancel = false, toArray = function(list) { return Array.prototype.slice.call(list || [], 0); }, doScan = function(items) { var entry, readEntries, excludes = fm.options.folderUploadExclude[fm.OS] || null, length = items.length, check = function() { if (--processing < 1 && scanDfd.state() === 'pending') { scanDfd.resolve(); } }, pushItem = function(file) { if (! excludes || ! file.name.match(excludes)) { paths.push(entry.fullPath || ''); files.push(file); } check(); }, readEntries = function(dirReader) { var entries = [], read = function() { dirReader.readEntries(function(results) { if (cancel || !results.length) { for (var i = 0; i < entries.length; i++) { if (cancel) { scanDfd.reject(); break; } doScan([entries[i]]); } check(); } else { entries = entries.concat(toArray(results)); read(); } }, check); }; read(); }; processing++; for (var i = 0; i < length; i++) { if (cancel) { scanDfd.reject(); break; } entry = items[i]; if (entry) { if (entry instanceof File) { pushItem(entry); } else if (entry.isFile) { processing++; entry.file(pushItem, check); } else if (entry.isDirectory) { if (fm.api >= 2.1) { processing++; mkdirs.push(entry.fullPath); readEntries(entry.createReader()); // Start reading dirs. } } } } check(); return scanDfd; }, hasDirs; items = $.map(data.files.items, function(item){ if (item.kind === 'file') { return (item.getAsEntry? item.getAsEntry() : item.webkitGetAsEntry()) || item.getAsFile(); } else { return null; } }); $.each(items, function(i, item) { if (item.isDirectory) { hasDirs = true; return false; } }); if (items.length > 0) { fm.uploads.checkExists(items, target, fm, hasDirs).done(function(renames, hashes){ var dfds = []; if (fm.options.overwriteUploadConfirm && fm.option('uploadOverwrite', target)) { if (renames === null) { data.overwrite = 0; renames = []; } items = $.grep(items, function(item){ var i, bak, hash, dfd, hi; if (item.isDirectory && renames.length) { i = $.inArray(item.name, renames); if (i !== -1) { renames.splice(i, 1); bak = fm.uniqueName(item.name + fm.options.backupSuffix , null, ''); $.each(hashes, function(h, name) { if (item.name == name) { hash = h; return false; } }); if (! hash) { hash = fm.fileByName(item.name, target).hash; } fm.lockfiles({files : [hash]}); dfd = fm.request({ data : {cmd : 'rename', target : hash, name : bak}, notify : {type : 'rename', cnt : 1} }) .fail(function() { item._remove = true; fm.sync(); }) .always(function() { fm.unlockfiles({files : [hash]}); }); dfds.push(dfd); } } return !item._remove? true : false; }); } $.when.apply($, dfds).done(function(){ var notifyto, msg, id = +new Date(); if (items.length > 0) { msg = fm.escape(items[0].name); if (items.length > 1) { msg += ' ... ' + items.length + fm.i18n('items'); } notifyto = setTimeout(function() { fm.notify({ type : 'readdir', id : id, cnt : 1, hideCnt: true, msg : fm.i18n('ntfreaddir') + ' (' + msg + ')', cancel: function() { cancel = true; } }); }, fm.options.notifyDelay); doScan(items).done(function() { notifyto && clearTimeout(notifyto); fm.notify({type : 'readdir', id: id, cnt : -1}); if (cancel) { dfrd.reject(); } else { dfrd.resolve([files, paths, renames, hashes, mkdirs]); } }).fail(function() { dfrd.reject(); }); } else { dfrd.reject(); } }); }); return dfrd.promise(); } else { return dfrd.reject(); } } else { var ret = []; var check = []; var str = data.files[0]; if (data.type == 'html') { var tmp = $("").append($.parseHTML(str.replace(/ src=/ig, ' _elfsrc='))), atag; $('img[_elfsrc]', tmp).each(function(){ var url, purl, self = $(this), pa = self.closest('a'); if (pa && pa.attr('href') && pa.attr('href').match(/\.(?:jpe?g|gif|bmp|png)/i)) { purl = pa.attr('href'); } url = self.attr('_elfsrc'); if (url) { if (purl) { $.inArray(purl, ret) == -1 && ret.push(purl); $.inArray(url, check) == -1 && check.push(url); } else { $.inArray(url, ret) == -1 && ret.push(url); } } // Probably it's clipboard data if (ret.length === 1 && ret[0].match(/^data:image\/png/)) { data.clipdata = true; } }); atag = $('a[href]', tmp); atag.each(function(){ var text, loc, parseUrl = function(url) { var a = document.createElement('a'); a.href = url; return a; }; if (text = $(this).text()) { loc = parseUrl($(this).attr('href')); if (loc.href && loc.href.match(/^(?:ht|f)tp/i) && (atag.length === 1 || ! loc.pathname.match(/(?:\.html?|\/[^\/.]*)$/i) || text.trim().match(/\.[a-z0-9-]{1,10}$/i))) { if ($.inArray(loc.href, ret) == -1 && $.inArray(loc.href, check) == -1) ret.push(loc.href); } } }); } else { var regex, m, url; regex = /((?:ht|f)tps?:\/\/[-_.!~*\'()a-z0-9;/?:\@&=+\$,%#\*\[\]]+)/ig; while (m = regex.exec(str)) { url = m[1].replace(/&/g, '&'); if ($.inArray(url, ret) == -1) ret.push(url); } } return ret; } }, // upload transport using XMLHttpRequest xhr : function(data, fm) { var self = fm ? fm : this, node = self.getUI(), xhr = new XMLHttpRequest(), notifyto = null, notifyto1 = null, notifyto2 = null, dataChecked = data.checked, isDataType = (data.isDataType || data.type == 'data'), target = (data.target || self.cwd().hash), dropEvt = (data.dropEvt || null), extraData = data.extraData || null, chunkEnable = (self.option('uploadMaxConn', target) != -1), multiMax = Math.min(5, Math.max(1, self.option('uploadMaxConn', target))), retryWait = 10000, // 10 sec retryMax = 30, // 10 sec * 30 = 300 secs (Max 5 mins) retry = 0, getFile = function(files) { var dfd = $.Deferred(), file; if (files.promise) { files.always(function(f) { dfd.resolve(Array.isArray(f) && f.length? (isDataType? f[0][0] : f[0]) : {}); }); } else { dfd.resolve(files.length? (isDataType? files[0][0] : files[0]) : {}); } return dfd; }, dfrd = $.Deferred() .fail(function(err) { var error = self.parseError(err), userAbort; if (error === 'userabort') { userAbort = true; error = void 0; } if (files && (self.uploads.xhrUploading || userAbort)) { // send request om fail getFile(files).done(function(file) { if (!userAbort) { triggerError(error, file); } if (! file._cid) { // send sync request self.uploads.failSyncTm && clearTimeout(self.uploads.failSyncTm); self.uploads.failSyncTm = setTimeout(function() { self.sync(target); }, 1000); } else if (! self.uploads.chunkfailReq[file._cid]) { // send chunkfail request self.uploads.chunkfailReq[file._cid] = true; setTimeout(function() { fm.request({ data : { cmd: 'upload', target: target, chunk: file._chunk, cid: file._cid, upload: ['chunkfail'], mimes: 'chunkfail' }, options : { type: 'post', url: self.uploadURL }, preventDefault: true }).always(function() { delete self.uploads.chunkfailReq[file._chunk]; }); }, 1000); } }); } else { triggerError(error); } !userAbort && self.sync(); self.uploads.xhrUploading = false; files = null; }) .done(function(data) { self.uploads.xhrUploading = false; files = null; if (data) { self.currentReqCmd = 'upload'; data.warning && triggerError(data.warning); self.updateCache(data); data.removed && data.removed.length && self.remove(data); data.added && data.added.length && self.add(data); data.changed && data.changed.length && self.change(data); self.trigger('upload', data, false); self.trigger('uploaddone'); if (data.toasts && Array.isArray(data.toasts)) { $.each(data.toasts, function() { this.msg && self.toast(this); }); } data.sync && self.sync(); if (data.debug) { self.responseDebug(data); fm.debug('backend-debug', data); } } }) .always(function() { self.abortXHR(xhr); // unregist fnAbort function node.off('uploadabort', fnAbort); $(window).off('unload', fnAbort); notifyto && clearTimeout(notifyto); notifyto1 && clearTimeout(notifyto1); notifyto2 && clearTimeout(notifyto2); dataChecked && !data.multiupload && checkNotify() && self.notify({type : 'upload', cnt : -cnt, progress : 0, size : 0}); notifyto1 && uploadedNtf && self.notify({type : 'chunkmerge', cnt : -cnt}); chunkMerge && notifyElm.children('.elfinder-notify-chunkmerge').length && self.notify({type : 'chunkmerge', cnt : -1}); }), formData = new FormData(), files = data.input ? data.input.files : self.uploads.checkFile(data, self, target), cnt = data.checked? (isDataType? files[0].length : files.length) : files.length, isChunked = false, loaded = 0, prev = 0, filesize = 0, notify = false, notifyElm = self.ui.notify, cancelBtn = true, uploadedNtf = false, abort = false, checkNotify = function() { if (!notify && (ntfUpload = notifyElm.children('.elfinder-notify-upload')).length) { notify = true; } return notify; }, fnAbort = function(e, error) { abort = true; self.abortXHR(xhr, { quiet: true, abort: true }); dfrd.reject(error); if (checkNotify()) { self.notify({type : 'upload', cnt : ntfUpload.data('cnt') * -1, progress : 0, size : 0}); } }, cancelToggle = function(show, hasChunk) { ntfUpload.children('.elfinder-notify-cancel')[show? 'show':'hide'](); cancelBtn = show; }, startNotify = function(size) { if (!size) size = filesize; return setTimeout(function() { notify = true; self.notify({type : 'upload', cnt : cnt, progress : loaded - prev, size : size, cancel: function() { node.trigger('uploadabort', 'userabort'); } }); ntfUpload = notifyElm.children('.elfinder-notify-upload'); prev = loaded; if (data.multiupload) { cancelBtn && cancelToggle(true); } else { cancelToggle(cancelBtn && loaded < size); } }, self.options.notifyDelay); }, doRetry = function() { if (retry++ <= retryMax) { if (checkNotify() && prev) { self.notify({type : 'upload', cnt : 0, progress : 0, size : prev}); } self.abortXHR(xhr, { quiet: true }); prev = loaded = 0; setTimeout(function() { var reqId; if (! abort) { xhr.open('POST', self.uploadURL, true); if (self.api >= 2.1029) { reqId = (+ new Date()).toString(16) + Math.floor(1000 * Math.random()).toString(16); (typeof formData['delete'] === 'function') && formData['delete']('reqid'); formData.append('reqid', reqId); xhr._requestId = reqId; } xhr.send(formData); } }, retryWait); } else { node.trigger('uploadabort', ['errAbort', 'errTimeout']); } }, progress = function() { var node; if (notify) { dfrd.notifyWith(ntfUpload, [{ cnt: ntfUpload.data('cnt'), progress: ntfUpload.data('progress'), total: ntfUpload.data('total') }]); } }, triggerError = function(err, file, unite) { err && self.trigger('xhruploadfail', { error: err, file: file }); if (unite) { if (err) { if (errCnt < self.options.maxErrorDialogs) { if (Array.isArray(err)) { errors = errors.concat(err); } else { errors.push(err); } } errCnt++; } } else { if (err) { self.error(err); } else { if (errors.length) { if (errCnt >= self.options.maxErrorDialogs) { errors = errors.concat('moreErrors', errCnt - self.options.maxErrorDialogs); } self.error(errors); } errors = []; errCnt = 0; } } }, errors = [], errCnt = 0, renames = (data.renames || null), hashes = (data.hashes || null), chunkMerge = false, ntfUpload = $(); // regist fnAbort function node.one('uploadabort', fnAbort); $(window).one('unload.' + fm.namespace, fnAbort); !chunkMerge && (prev = loaded); if (!isDataType && !cnt) { return dfrd.reject(['errUploadNoFiles']); } xhr.addEventListener('error', function() { if (xhr.status == 0) { if (abort) { dfrd.reject(); } else { // ff bug while send zero sized file // for safari - send directory if (!isDataType && data.files && $.grep(data.files, function(f){return ! f.type && f.size === (self.UA.Safari? 1802 : 0)? true : false;}).length) { dfrd.reject(['errAbort', 'errFolderUpload']); } else if (data.input && $.grep(data.input.files, function(f){return ! f.type && f.size === (self.UA.Safari? 1802 : 0)? true : false;}).length) { dfrd.reject(['errUploadNoFiles']); } else { doRetry(); } } } else { node.trigger('uploadabort', 'errConnect'); } }, false); xhr.addEventListener('load', function(e) { var status = xhr.status, res, curr = 0, error = '', errData, errObj; self.setCustomHeaderByXhr(xhr); if (status >= 400) { if (status > 500) { error = 'errResponse'; } else { error = ['errResponse', 'errServerError']; } } else { if (!xhr.responseText) { error = ['errResponse', 'errDataEmpty']; } } if (error) { node.trigger('uploadabort'); getFile(files || {}).done(function(file) { return dfrd.reject(file._cid? null : error); }); } loaded = filesize; if (checkNotify() && (curr = loaded - prev)) { self.notify({type : 'upload', cnt : 0, progress : curr, size : 0}); progress(); } res = self.parseUploadData(xhr.responseText); // chunked upload commit if (res._chunkmerged) { formData = new FormData(); var _file = [{_chunkmerged: res._chunkmerged, _name: res._name, _mtime: res._mtime}]; chunkMerge = true; node.off('uploadabort', fnAbort); notifyto2 = setTimeout(function() { self.notify({type : 'chunkmerge', cnt : 1}); }, self.options.notifyDelay); isDataType? send(_file, files[1]) : send(_file); return; } res._multiupload = data.multiupload? true : false; if (res.error) { errData = { cmd: 'upload', err: res, xhr: xhr, rc: xhr.status }; self.trigger('uploadfail', res); // trigger "requestError" event self.trigger('requestError', errData); if (errData._getEvent && errData._getEvent().isDefaultPrevented()) { res.error = ''; } else if (self.handleCsrfReload(xhr, res)) { res.error = ''; } if (res._chunkfailure || res._multiupload) { abort = true; self.uploads.xhrUploading = false; notifyto && clearTimeout(notifyto); if (ntfUpload.length) { self.notify({type : 'upload', cnt : -cnt, progress : 0, size : 0}); dfrd.reject(res); } else { // for multi connection dfrd.reject(); } } else { dfrd.reject(res); } } else { dfrd.resolve(res); } }, false); xhr.upload.addEventListener('loadstart', function(e) { if (!chunkMerge && e.lengthComputable) { loaded = e.loaded; retry && (loaded = 0); filesize = e.total; if (!loaded) { loaded = parseInt(filesize * 0.05); } if (checkNotify()) { self.notify({type : 'upload', cnt : 0, progress : loaded - prev, size : data.multiupload? 0 : filesize}); prev = loaded; progress(); } } }, false); xhr.upload.addEventListener('progress', function(e) { var curr; if (e.lengthComputable && !chunkMerge && xhr.readyState < 2) { loaded = e.loaded; // to avoid strange bug in safari (not in chrome) with drag&drop. // bug: macos finder opened in any folder, // reset safari cache (option+command+e), reload elfinder page, // drop file from finder // on first attempt request starts (progress callback called ones) but never ends. // any next drop - successfull. if (!data.checked && loaded > 0 && !notifyto) { notifyto = startNotify(xhr._totalSize - loaded); } if (!filesize) { filesize = e.total; if (!loaded) { loaded = parseInt(filesize * 0.05); } } curr = loaded - prev; if (checkNotify() && (curr/e.total) >= 0.05) { self.notify({type : 'upload', cnt : 0, progress : curr, size : 0}); prev = loaded; progress(); } if (!uploadedNtf && loaded >= filesize && !isChunked) { // Use "chunkmerge" for "server-in-process" notification uploadedNtf = true; notifyto1 = setTimeout(function() { self.notify({type : 'chunkmerge', cnt : cnt}); }, self.options.notifyDelay); } if (cancelBtn && ! data.multiupload && loaded >= filesize) { checkNotify() && cancelToggle(false); } } }, false); var send = function(files, paths){ var size = 0, fcnt = 1, sfiles = [], c = 0, total = cnt, maxFileSize, totalSize = 0, chunked = [], chunkID = new Date().getTime().toString().substr(-9), // for take care of the 32bit backend system BYTES_PER_CHUNK = Math.min((fm.uplMaxSize? fm.uplMaxSize : 2097152) - 8190, fm.options.uploadMaxChunkSize), // uplMaxSize margin 8kb or options.uploadMaxChunkSize blobSlice = chunkEnable? false : '', blobSize, blobMtime, blobName, i, start, end, chunks, blob, chunk, added, done, last, failChunk, multi = function(files, num){ var sfiles = [], cid, sfilesLen = 0, cancelChk, hasChunk; if (!abort) { while(files.length && sfiles.length < num) { sfiles.push(files.shift()); } sfilesLen = sfiles.length; if (sfilesLen) { cancelChk = sfilesLen; for (var i=0; i < sfilesLen; i++) { if (abort) { break; } cid = isDataType? (sfiles[i][0][0]._cid || null) : (sfiles[i][0]._cid || null); hasChunk = (hasChunk || cid)? true : false; if (!!failChunk[cid]) { last--; continue; } fm.exec('upload', { type: data.type, isDataType: isDataType, files: sfiles[i], checked: true, target: target, dropEvt: dropEvt, renames: renames, hashes: hashes, multiupload: true, overwrite: data.overwrite === 0? 0 : void 0, clipdata: data.clipdata }, void 0, target) .fail(function(error) { if (error && error === 'No such command') { abort = true; fm.error(['errUpload', 'errPerm']); } if (cid) { failChunk[cid] = true; } }) .always(function(e) { if (e && e.added) added = $.merge(added, e.added); if (last <= ++done) { fm.trigger('multiupload', {added: added}); notifyto && clearTimeout(notifyto); if (checkNotify()) { self.notify({type : 'upload', cnt : -cnt, progress : 0, size : 0}); } } if (files.length) { multi(files, 1); // Next one } else { if (--cancelChk <= 1) { if (cancelBtn) { cancelToggle(false, hasChunk); } } dfrd.resolve(); } }); } } } if (sfiles.length < 1 || abort) { if (abort) { notifyto && clearTimeout(notifyto); if (cid) { failChunk[cid] = true; } dfrd.reject(); } else { dfrd.resolve(); self.uploads.xhrUploading = false; } } }, check = function(){ if (!self.uploads.xhrUploading) { self.uploads.xhrUploading = true; multi(sfiles, multiMax); // Max connection: 3 } else { setTimeout(check, 100); } }, reqId, err; if (! dataChecked && (isDataType || data.type == 'files')) { if (! (maxFileSize = fm.option('uploadMaxSize', target))) { maxFileSize = 0; } for (i=0; i < files.length; i++) { try { blob = files[i]; blobSize = blob.size; if (blobSlice === false) { blobSlice = ''; if (self.api >= 2.1) { if ('slice' in blob) { blobSlice = 'slice'; } else if ('mozSlice' in blob) { blobSlice = 'mozSlice'; } else if ('webkitSlice' in blob) { blobSlice = 'webkitSlice'; } } } } catch(e) { cnt--; total--; continue; } // file size check if ((maxFileSize && blobSize > maxFileSize) || (!blobSlice && fm.uplMaxSize && blobSize > fm.uplMaxSize)) { triggerError(['errUploadFile', blob.name, 'errUploadFileSize'], blob, true); cnt--; total--; continue; } // file mime check if (blob.type && ! self.uploadMimeCheck(blob.type, target)) { triggerError(['errUploadFile', blob.name, 'errUploadMime', '(' + blob.type + ')'], blob, true); cnt--; total--; continue; } if (blobSlice && blobSize > BYTES_PER_CHUNK) { start = 0; end = BYTES_PER_CHUNK; chunks = -1; total = Math.floor((blobSize - 1) / BYTES_PER_CHUNK); blobMtime = blob.lastModified? Math.round(blob.lastModified/1000) : 0; blobName = data.clipdata? fm.date(fm.nonameDateFormat) + '.png' : blob.name; totalSize += blobSize; chunked[chunkID] = 0; while(start < blobSize) { chunk = blob[blobSlice](start, end); chunk._chunk = blobName + '.' + (++chunks) + '_' + total + '.part'; chunk._cid = chunkID; chunk._range = start + ',' + chunk.size + ',' + blobSize; chunk._mtime = blobMtime; chunked[chunkID]++; if (size) { c++; } if (typeof sfiles[c] == 'undefined') { sfiles[c] = []; if (isDataType) { sfiles[c][0] = []; sfiles[c][1] = []; } } size = BYTES_PER_CHUNK; fcnt = 1; if (isDataType) { sfiles[c][0].push(chunk); sfiles[c][1].push(paths[i]); } else { sfiles[c].push(chunk); } start = end; end = start + BYTES_PER_CHUNK; } if (chunk == null) { triggerError(['errUploadFile', blob.name, 'errUploadFileSize'], blob, true); cnt--; total--; } else { total += chunks; size = 0; fcnt = 1; c++; } continue; } if ((fm.uplMaxSize && size + blobSize > fm.uplMaxSize) || fcnt > fm.uplMaxFile) { size = 0; fcnt = 1; c++; } if (typeof sfiles[c] == 'undefined') { sfiles[c] = []; if (isDataType) { sfiles[c][0] = []; sfiles[c][1] = []; } } if (isDataType) { sfiles[c][0].push(blob); sfiles[c][1].push(paths[i]); } else { sfiles[c].push(blob); } size += blobSize; totalSize += blobSize; fcnt++; } if (errors.length) { triggerError(); } if (sfiles.length == 0) { // no data data.checked = true; return false; } if (sfiles.length > 1) { // multi upload notifyto = startNotify(totalSize); added = []; done = 0; last = sfiles.length; failChunk = []; check(); return true; } // single upload if (isDataType) { files = sfiles[0][0]; paths = sfiles[0][1]; } else { files = sfiles[0]; } } if (!dataChecked) { if (!fm.UA.Safari || !data.files) { notifyto = startNotify(totalSize); } else { xhr._totalSize = totalSize; } } dataChecked = true; if (! files.length) { dfrd.reject(['errUploadNoFiles']); } xhr.open('POST', self.uploadURL, true); // set request headers if (fm.customHeaders) { $.each(fm.customHeaders, function(key) { xhr.setRequestHeader(key, this); }); } // set xhrFields if (fm.xhrFields) { $.each(fm.xhrFields, function(key) { if (key in xhr) { xhr[key] = this; } }); } if (self.api >= 2.1029) { // request ID reqId = (+ new Date()).toString(16) + Math.floor(1000 * Math.random()).toString(16); formData.append('reqid', reqId); xhr._requestId = reqId; } formData.append('cmd', 'upload'); formData.append(self.newAPI ? 'target' : 'current', target); if (renames && renames.length) { $.each(renames, function(i, v) { formData.append('renames[]', v); }); formData.append('suffix', fm.options.backupSuffix); } if (hashes) { $.each(hashes, function(i, v) { formData.append('hashes['+ i +']', v); }); } $.each(self.customData, function(key, val) { formData.append(key, val); }); $.each(self.options.onlyMimes, function(i, mime) { formData.append('mimes[]', mime); }); $.each(files, function(i, file) { var name, relpath; if (file._chunkmerged) { formData.append('chunk', file._chunkmerged); formData.append('upload[]', file._name); formData.append('mtime[]', file._mtime); data.clipdata && formData.append('overwrite', 0); isChunked = true; } else { if (file._chunkfail) { formData.append('upload[]', 'chunkfail'); formData.append('mimes', 'chunkfail'); } else { if (data.clipdata) { if (!file._chunk) { data.overwrite = 0; name = fm.date(fm.nonameDateFormat) + '.png'; } } else { if (file.name) { name = file.name; if (fm.UA.iOS) { if (name.match(/^image\.jpe?g$/i)) { data.overwrite = 0; name = fm.date(fm.nonameDateFormat) + '.jpg'; } else if (name.match(/^capturedvideo\.mov$/i)) { data.overwrite = 0; name = fm.date(fm.nonameDateFormat) + '.mov'; } } relpath = (file.webkitRelativePath || file.relativePath || file._relativePath || '').replace(/[^\/]+$/, ''); name = relpath + name; } } name? formData.append('upload[]', file, name) : formData.append('upload[]', file); } if (file._chunk) { formData.append('chunk', file._chunk); formData.append('cid' , file._cid); formData.append('range', file._range); formData.append('mtime[]', file._mtime); isChunked = true; } else { formData.append('mtime[]', file.lastModified? Math.round(file.lastModified/1000) : 0); } } }); if (isDataType) { $.each(paths, function(i, path) { formData.append('upload_path[]', path); }); } if (data.overwrite === 0) { formData.append('overwrite', 0); } // send int value that which meta key was pressed when dropped as `dropWith` if (dropEvt) { formData.append('dropWith', parseInt( (dropEvt.altKey ? '1' : '0')+ (dropEvt.ctrlKey ? '1' : '0')+ (dropEvt.metaKey ? '1' : '0')+ (dropEvt.shiftKey? '1' : '0'), 2)); } // set extraData on current request if (extraData) { $.each(extraData, function(key, val) { formData.append(key, val); }); } xhr.send(formData); return true; }; if (! isDataType) { if (files.length > 0) { if (! data.clipdata && renames == null) { var mkdirs = [], paths = [], excludes = fm.options.folderUploadExclude[fm.OS] || null; $.each(files, function(i, file) { var relPath = file.webkitRelativePath || file.relativePath || '', idx, rootDir; if (! relPath) { return false; } if (excludes && file.name.match(excludes)) { file._remove = true; relPath = void(0); } else { // add '/' as prefix to make same to folder uploading with DnD, see #2607 relPath = '/' + relPath.replace(/\/[^\/]*$/, '').replace(/^\//, ''); if (relPath && $.inArray(relPath, mkdirs) === -1) { mkdirs.push(relPath); // checking the root directory to supports see #2378 idx = relPath.substr(1).indexOf('/'); if (idx !== -1 && (rootDir = relPath.substr(0, idx + 1)) && $.inArray(rootDir, mkdirs) === -1) { mkdirs.unshift(rootDir); } } } paths.push(relPath); }); renames = []; hashes = {}; if (mkdirs.length) { (function() { var checkDirs = $.map(mkdirs, function(name) { return name.substr(1).indexOf('/') === -1 ? {name: name.substr(1)} : null;}), cancelDirs = []; fm.uploads.checkExists(checkDirs, target, fm, true).done( function(res, res2) { var dfds = [], dfd, bak, hash; if (fm.options.overwriteUploadConfirm && fm.option('uploadOverwrite', target)) { cancelDirs = $.map(checkDirs, function(dir) { return dir._remove? dir.name : null ;} ); checkDirs = $.grep(checkDirs, function(dir) { return !dir._remove? true : false ;} ); } if (cancelDirs.length) { $.each(paths.concat(), function(i, path) { if ($.inArray(path, cancelDirs) === 0) { files[i]._remove = true; paths[i] = void(0); } }); } files = $.grep(files, function(file) { return file._remove? false : true; }); paths = $.grep(paths, function(path) { return path === void 0 ? false : true; }); if (checkDirs.length) { dfd = $.Deferred(); if (res.length) { $.each(res, function(i, existName) { // backup bak = fm.uniqueName(existName + fm.options.backupSuffix , null, ''); $.each(res2, function(h, name) { if (res[0] == name) { hash = h; return false; } }); if (! hash) { hash = fm.fileByName(res[0], target).hash; } fm.lockfiles({files : [hash]}); dfds.push( fm.request({ data : {cmd : 'rename', target : hash, name : bak}, notify : {type : 'rename', cnt : 1} }) .fail(function(error) { dfrd.reject(error); fm.sync(); }) .always(function() { fm.unlockfiles({files : [hash]}); }) ); }); } else { dfds.push(null); } $.when.apply($, dfds).done(function() { // ensure directories fm.request({ data : {cmd : 'mkdir', target : target, dirs : mkdirs}, notify : {type : 'mkdir', cnt : mkdirs.length}, preventFail: true }) .fail(function(error) { error = error || ['errUnknown']; if (error[0] === 'errCmdParams') { multiMax = 1; } else { multiMax = 0; dfrd.reject(error); } }) .done(function(data) { var rm = false; if (!data.hashes) { data.hashes = {}; } paths = $.map(paths.concat(), function(p, i) { if (p === '/') { return target; } else { if (data.hashes[p]) { return data.hashes[p]; } else { rm = true; files[i]._remove = true; return null; } } }); if (rm) { files = $.grep(files, function(file) { return file._remove? false : true; }); } }) .always(function(data) { if (multiMax) { isDataType = true; if (! send(files, paths)) { dfrd.reject(); } } }); }); } else { dfrd.reject(); } } ); })(); } else { fm.uploads.checkExists(files, target, fm).done( function(res, res2){ if (fm.options.overwriteUploadConfirm && fm.option('uploadOverwrite', target)) { hashes = res2; if (res === null) { data.overwrite = 0; } else { renames = res; } files = $.grep(files, function(file){return !file._remove? true : false ;}); } cnt = files.length; if (cnt > 0) { if (! send(files)) { dfrd.reject(); } } else { dfrd.reject(); } } ); } } else { if (! send(files)) { dfrd.reject(); } } } else { dfrd.reject(); } } else { if (dataChecked) { send(files[0], files[1]); } else { files.done(function(result) { // result: [files, paths, renames, hashes, mkdirs] renames = []; cnt = result[0].length; if (cnt) { if (result[4] && result[4].length) { // ensure directories fm.request({ data : {cmd : 'mkdir', target : target, dirs : result[4]}, notify : {type : 'mkdir', cnt : result[4].length}, preventFail: true }) .fail(function(error) { error = error || ['errUnknown']; if (error[0] === 'errCmdParams') { multiMax = 1; } else { multiMax = 0; dfrd.reject(error); } }) .done(function(data) { var rm = false; if (!data.hashes) { data.hashes = {}; } result[1] = $.map(result[1], function(p, i) { result[0][i]._relativePath = p.replace(/^\//, ''); p = p.replace(/\/[^\/]*$/, ''); if (p === '') { return target; } else { if (data.hashes[p]) { return data.hashes[p]; } else { rm = true; result[0][i]._remove = true; return null; } } }); if (rm) { result[0] = $.grep(result[0], function(file) { return file._remove? false : true; }); } }) .always(function(data) { if (multiMax) { renames = result[2]; hashes = result[3]; send(result[0], result[1]); } }); return; } else { result[1] = $.map(result[1], function() { return target; }); } renames = result[2]; hashes = result[3]; send(result[0], result[1]); } else { dfrd.reject(['errUploadNoFiles']); } }).fail(function(){ dfrd.reject(); }); } } return dfrd; }, // upload transport using iframe iframe : function(data, fm) { var self = fm ? fm : this, input = data.input? data.input : false, files = !input ? self.uploads.checkFile(data, self) : false, dfrd = $.Deferred() .fail(function(error) { error && self.error(error); }), name = 'iframe-'+fm.namespace+(++self.iframeCnt), form = $('
'), msie = this.UA.IE, // clear timeouts, close notification dialog, remove form/iframe onload = function() { abortto && clearTimeout(abortto); notifyto && clearTimeout(notifyto); notify && self.notify({type : 'upload', cnt : -cnt}); setTimeout(function() { msie && $('').appendTo(form); form.remove(); iframe.remove(); }, 100); }, iframe = $('') .on('load', function() { iframe.off('load') .on('load', function() { onload(); // data will be processed in callback response or window onmessage dfrd.resolve(); }); // notify dialog notifyto = setTimeout(function() { notify = true; self.notify({type : 'upload', cnt : cnt}); }, self.options.notifyDelay); // emulate abort on timeout if (self.options.iframeTimeout > 0) { abortto = setTimeout(function() { onload(); dfrd.reject(['errConnect', 'errTimeout']); }, self.options.iframeTimeout); } form.submit(); }), target = (data.target || self.cwd().hash), names = [], dfds = [], renames = [], hashes = {}, cnt, notify, notifyto, abortto; if (files && files.length) { $.each(files, function(i, val) { form.append(''); }); cnt = 1; } else if (input && $(input).is(':file') && $(input).val()) { if (fm.options.overwriteUploadConfirm && fm.option('uploadOverwrite', target)) { names = input.files? input.files : [{ name: $(input).val().replace(/^(?:.+[\\\/])?([^\\\/]+)$/, '$1') }]; //names = $.map(names, function(file){return file.name? { name: file.name } : null ;}); dfds.push(self.uploads.checkExists(names, target, self).done( function(res, res2){ hashes = res2; if (res === null) { data.overwrite = 0; } else{ renames = res; cnt = $.grep(names, function(file){return !file._remove? true : false ;}).length; if (cnt != names.length) { cnt = 0; } } } )); } cnt = input.files ? input.files.length : 1; form.append(input); } else { return dfrd.reject(); } $.when.apply($, dfds).done(function() { if (cnt < 1) { return dfrd.reject(); } form.append('') .append('') .append('') .append($(input).attr('name', 'upload[]')); if (renames.length > 0) { $.each(renames, function(i, rename) { form.append(''); }); form.append(''); } if (hashes) { $.each(renames, function(i, v) { form.append(''); }); } if (data.overwrite === 0) { form.append(''); } $.each(self.options.onlyMimes||[], function(i, mime) { form.append(''); }); $.each(self.customData, function(key, val) { form.append(''); }); form.appendTo('body'); iframe.appendTo('body'); }); return dfrd; } }, /** * Bind callback to event(s) The callback is executed at most once per event. * To bind to multiply events at once, separate events names by space * * @param String event name * @param Function callback * @param Boolan priority first * @return elFinder */ one : function(ev, callback, priorityFirst) { var self = this, event = ev.toLowerCase(), h = function(e, f) { if (!self.toUnbindEvents[event]) { self.toUnbindEvents[event] = []; } self.toUnbindEvents[event].push({ type: event, callback: h }); return (callback.done? callback.done : callback).apply(this, arguments); }; if (callback.done) { h = {done: h}; } return this.bind(event, h, priorityFirst); }, /** * Set/get data into/from localStorage * * @param String key * @param String|void value * @return String|null */ localStorage : function(key, val) { var self = this, s = window.localStorage, oldkey = 'elfinder-'+(key || '')+this.id, // old key of elFinder < 2.1.6 prefix = window.location.pathname+'-elfinder-', suffix = this.id, clrs = [], retval, oldval, t, precnt, sufcnt; // reset this node data if (typeof(key) === 'undefined') { precnt = prefix.length; sufcnt = suffix.length * -1; $.each(s, function(key) { if (key.substr(0, precnt) === prefix && key.substr(sufcnt) === suffix) { clrs.push(key); } }); $.each(clrs, function(i, key) { s.removeItem(key); }); return true; } // new key of elFinder >= 2.1.6 key = prefix+key+suffix; if (val === null) { return s.removeItem(key); } if (val === void(0) && !(retval = s.getItem(key)) && (oldval = s.getItem(oldkey))) { val = oldval; s.removeItem(oldkey); } if (val !== void(0)) { t = typeof val; if (t !== 'string' && t !== 'number') { val = JSON.stringify(val); } try { s.setItem(key, val); } catch (e) { try { s.clear(); s.setItem(key, val); } catch (e) { self.debug('error', e.toString()); } } retval = s.getItem(key); } if (retval && (retval.substr(0,1) === '{' || retval.substr(0,1) === '[')) { try { return JSON.parse(retval); } catch(e) {} } return retval; }, /** * Set/get data into/from sessionStorage * * @param String key * @param String|void value * @return String|null */ sessionStorage : function(key, val) { var self = this, s, retval, t; try { s = window.sessionStorage; } catch(e) {} if (!s) { return; } if (val === null) { return s.removeItem(key); } if (val !== void(0)) { t = typeof val; if (t !== 'string' && t !== 'number') { val = JSON.stringify(val); } try { s.setItem(key, val); } catch (e) { try { s.clear(); s.setItem(key, val); } catch (e) { self.debug('error', e.toString()); } } } retval = s.getItem(key); if (retval && (retval.substr(0,1) === '{' || retval.substr(0,1) === '[')) { try { return JSON.parse(retval); } catch(e) {} } return retval; }, /** * Get/set cookie * * @param String cookie name * @param String|void cookie value * @return String|null */ cookie : function(name, value) { var d, o, c, i, retval, t; name = 'elfinder-'+name+this.id; if (value === void(0)) { if (this.cookieEnabled && document.cookie && document.cookie != '') { c = document.cookie.split(';'); name += '='; for (i=0; i'), /** * Replace not html-safe symbols to html entities * * @param String text to escape * @return String */ escape : function(name) { return this._node.text(name).html().replace(/"/g, '"').replace(/'/g, '''); }, /** * Cleanup ajax data. * For old api convert data into new api format * * @param String command name * @param Object data from backend * @return Object */ normalize : function(data) { var self = this, fileFilter = (function() { var func, filter; if (filter = self.options.fileFilter) { if (typeof filter === 'function') { func = function(file) { return filter.call(self, file); }; } else if (filter instanceof RegExp) { func = function(file) { return filter.test(file.name); }; } } return func? func : null; })(), chkCmdMap = function(opts) { // Disable command to replace with other command var disabled; if (opts.uiCmdMap) { if ($.isPlainObject(opts.uiCmdMap) && Object.keys(opts.uiCmdMap).length) { if (!opts.disabledFlip) { opts.disabledFlip = {}; } disabled = opts.disabledFlip; $.each(opts.uiCmdMap, function(f, t) { if (t === 'hidden' && !disabled[f]) { opts.disabled.push(f); opts.disabledFlip[f] = true; } }); } else { delete opts.uiCmdMap; } } }, normalizeOptions = function(opts) { var getType = function(v) { var type = typeof v; if (type === 'object' && Array.isArray(v)) { type = 'array'; } return type; }; $.each(self.optionProperties, function(k, empty) { if (empty !== void(0)) { if (opts[k] && getType(opts[k]) !== getType(empty)) { opts[k] = empty; } } }); if (opts.disabled) { opts.disabledFlip = self.arrayFlip(opts.disabled, true); $.each(self.options.disabledCmdsRels, function(com, rels) { var m, flg; if (opts.disabledFlip[com]) { flg = true; } else if (m = com.match(/^([^&]+)&([^=]+)=(.*)$/)) { if (opts.disabledFlip[m[1]] && opts[m[2]] == m[3]) { flg = true; } } if (flg) { $.each(rels, function(i, rel) { if (!opts.disabledFlip[rel]) { opts.disabledFlip[rel] = true; opts.disabled.push(rel); } }); } }); } else { opts.disabledFlip = {}; } return opts; }, filter = function(file, asMap, type) { var res = asMap? file : true, ign = asMap? null : false, vid, targetOptions, isRoot, rootNames; if (file && file.hash && file.name && file.mime) { if (file.mime === 'application/x-empty') { file.mime = 'text/plain'; } isRoot = self.isRoot(file); if (isRoot && ! file.volumeid) { self.debug('warning', 'The volume root statuses requires `volumeid` property.'); } if (isRoot || file.mime === 'directory') { // Prevention of circular reference if (file.phash) { if (file.phash === file.hash) { error = error.concat(['Parent folder of "$1" is itself.', file.name]); return ign; } if (isRoot && file.volumeid && file.phash.indexOf(file.volumeid) === 0) { error = error.concat(['Parent folder of "$1" is inner itself.', file.name]); return ign; } } // set options, tmbUrls for each volume if (file.volumeid) { vid = file.volumeid; if (isRoot) { // make or update of leaf roots cache if (file.phash) { if (! self.leafRoots[file.phash]) { self.leafRoots[file.phash] = [ file.hash ]; } else { if ($.inArray(file.hash, self.leafRoots[file.phash]) === -1) { self.leafRoots[file.phash].push(file.hash); } } } self.hasVolOptions = true; if (! self.volOptions[vid]) { self.volOptions[vid] = { // set dispInlineRegex dispInlineRegex: self.options.dispInlineRegex }; } targetOptions = self.volOptions[vid]; if (file.options) { // >= v.2.1.14 has file.options Object.assign(targetOptions, file.options); } // for compat <= v2.1.13 if (file.disabled) { targetOptions.disabled = file.disabled; targetOptions.disabledFlip = self.arrayFlip(file.disabled, true); } if (file.tmbUrl) { targetOptions.tmbUrl = file.tmbUrl; } // '/' required at the end of url if (targetOptions.url && targetOptions.url.substr(-1) !== '/') { targetOptions.url += '/'; } // check uiCmdMap chkCmdMap(targetOptions); // check trash bin hash if (targetOptions.trashHash) { if (self.trashes[targetOptions.trashHash] === false) { delete targetOptions.trashHash; } else { self.trashes[targetOptions.trashHash] = file.hash; } } // set immediate properties $.each(self.optionProperties, function(k) { if (targetOptions[k]) { file[k] = targetOptions[k]; } }); // regist fm.roots if (type !== 'cwd') { self.roots[vid] = file.hash; } // regist fm.volumeExpires if (file.expires) { self.volumeExpires[vid] = file.expires; } } if (prevId !== vid) { prevId = vid; i18nFolderName = self.option('i18nFolderName', vid); } } // volume root i18n name if (isRoot && ! file.i18) { name = 'volume_' + file.name, i18 = self.i18n(false, name); if (name !== i18) { file.i18 = i18; } } // i18nFolderName if (i18nFolderName && ! file.i18) { name = 'folder_' + file.name, i18 = self.i18n(false, name); if (name !== i18) { file.i18 = i18; } } if (isRoot && self.options.enableRootRename !== false) { if (rootNames = self.storage('rootNames')) { if (rootNames[file.hash]) { file._name = file.name; file._i18 = file.i18; file.name = rootNames[file.hash] = rootNames[file.hash]; delete file.i18; } self.storage('rootNames', rootNames); } } // lock trash bins holder if (self.trashes[file.hash]) { file.locked = true; } } else { if (fileFilter) { try { if (! fileFilter(file)) { return ign; } } catch(e) { self.debug(e); } } if (file.size == 0) { file.mime = self.getMimetype(file.name, file.mime); } } if (file.options) { self.optionsByHashes[file.hash] = normalizeOptions(file.options); } delete file.options; return res; } return ign; }, getDescendants = function(hashes) { var res = []; $.each(self.files(), function(h, f) { $.each(self.parents(h), function(i, ph) { if ($.inArray(ph, hashes) !== -1 && $.inArray(h, hashes) === -1) { res.push(h); return false; } }); }); return res; }, applyLeafRootStats = function(dataArr, type) { $.each(dataArr, function(i, f) { var pfile, done; if (self.leafRoots[f.hash]) { self.applyLeafRootStats(f); } // update leaf root parent stat if (type !== 'change' && f.phash && self.isRoot(f) && (pfile = self.file(f.phash))) { self.applyLeafRootStats(pfile); // add to data.changed if (!data.changed) { data.changed = [pfile]; } else { $.each(data.changed, function(i, f) { if (f.hash === pfile.hash) { data.changed[i] = pfile; done = true; return false; } }); if (!done) { data.changed.push(pfile); } } } }); }, error = [], name, i18, i18nFolderName, prevId, cData; // set cunstom data if (data.customData && (!self.prevCustomData || (JSON.stringify(data.customData) !== JSON.stringify(self.prevCustomData)))) { self.prevCustomData = data.customData; try { cData = JSON.parse(data.customData); if ($.isPlainObject(cData)) { self.prevCustomData = cData; $.each(Object.keys(cData), function(i, key) { if (cData[key] === null) { delete cData[key]; delete self.optsCustomData[key]; } }); self.customData = Object.assign({}, self.optsCustomData, cData); } } catch(e) {} } if (data.options) { normalizeOptions(data.options); } if (data.cwd) { if (data.cwd.volumeid && data.options && Object.keys(data.options).length && self.isRoot(data.cwd)) { self.hasVolOptions = true; self.volOptions[data.cwd.volumeid] = data.options; } data.cwd = filter(data.cwd, true, 'cwd'); } if (data.files) { data.files = $.grep(data.files, filter); } if (data.tree) { data.tree = $.grep(data.tree, filter); } if (data.added) { data.added = $.grep(data.added, filter); } if (data.changed) { data.changed = $.grep(data.changed, filter); } if (data.removed && data.removed.length && self.searchStatus.state === 2) { data.removed = data.removed.concat(getDescendants(data.removed)); } if (data.api) { data.init = true; } if (Object.keys(self.leafRoots).length) { data.files && applyLeafRootStats(data.files); data.tree && applyLeafRootStats(data.tree); data.added && applyLeafRootStats(data.added); data.changed && applyLeafRootStats(data.changed, 'change'); } // merge options that apply only to cwd if (data.cwd && data.cwd.options && data.options) { Object.assign(data.options, normalizeOptions(data.cwd.options)); } // '/' required at the end of url if (data.options && data.options.url && data.options.url.substr(-1) !== '/') { data.options.url += '/'; } // check error if (error.length) { data.norError = ['errResponse'].concat(error); } return data; }, /** * Update sort options * * @param {String} sort type * @param {String} sort order * @param {Boolean} show folder first */ setSort : function(type, order, stickFolders, alsoTreeview) { this.storage('sortType', (this.sortType = this.sortRules[type] ? type : 'name')); this.storage('sortOrder', (this.sortOrder = /asc|desc/.test(order) ? order : 'asc')); this.storage('sortStickFolders', (this.sortStickFolders = !!stickFolders) ? 1 : ''); this.storage('sortAlsoTreeview', (this.sortAlsoTreeview = !!alsoTreeview) ? 1 : ''); this.trigger('sortchange'); }, _sortRules : { name : function(file1, file2) { return elFinder.prototype.naturalCompare(file1.i18 || file1.name, file2.i18 || file2.name); }, size : function(file1, file2) { var size1 = parseInt(file1.size) || 0, size2 = parseInt(file2.size) || 0; return size1 === size2 ? 0 : size1 > size2 ? 1 : -1; }, kind : function(file1, file2) { return elFinder.prototype.naturalCompare(file1.mime, file2.mime); }, date : function(file1, file2) { var date1 = file1.ts || file1.date || 0, date2 = file2.ts || file2.date || 0; return date1 === date2 ? 0 : date1 > date2 ? 1 : -1; }, perm : function(file1, file2) { var val = function(file) { return (file.write? 2 : 0) + (file.read? 1 : 0); }, v1 = val(file1), v2 = val(file2); return v1 === v2 ? 0 : v1 > v2 ? 1 : -1; }, mode : function(file1, file2) { var v1 = file1.mode || (file1.perm || ''), v2 = file2.mode || (file2.perm || ''); return elFinder.prototype.naturalCompare(v1, v2); }, owner : function(file1, file2) { var v1 = file1.owner || '', v2 = file2.owner || ''; return elFinder.prototype.naturalCompare(v1, v2); }, group : function(file1, file2) { var v1 = file1.group || '', v2 = file2.group || ''; return elFinder.prototype.naturalCompare(v1, v2); } }, /** * Valid sort rule names * * @type Object */ sorters : {}, /** * Compare strings for natural sort * * @param String * @param String * @return Number */ naturalCompare : function(a, b) { var self = elFinder.prototype.naturalCompare; if (typeof self.loc == 'undefined') { self.loc = (navigator.userLanguage || navigator.browserLanguage || navigator.language || 'en-US'); } if (typeof self.sort == 'undefined') { if ('11'.localeCompare('2', self.loc, {numeric: true}) > 0) { // Native support if (window.Intl && window.Intl.Collator) { self.sort = new Intl.Collator(self.loc, {numeric: true}).compare; } else { self.sort = function(a, b) { return a.localeCompare(b, self.loc, {numeric: true}); }; } } else { /* * Edited for elFinder (emulates localeCompare() by numeric) by Naoki Sawada aka nao-pon */ /* * Huddle/javascript-natural-sort (https://github.com/Huddle/javascript-natural-sort) */ /* * Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license * Author: Jim Palmer (based on chunking idea from Dave Koelle) * http://opensource.org/licenses/mit-license.php */ self.sort = function(a, b) { var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi, sre = /(^[ ]*|[ ]*$)/g, dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, hre = /^0x[0-9a-f]+$/i, ore = /^0/, syre = /^[\x01\x21-\x2f\x3a-\x40\x5b-\x60\x7b-\x7e]/, // symbol first - (Naoki Sawada) i = function(s) { return self.sort.insensitive && (''+s).toLowerCase() || ''+s; }, // convert all to strings strip whitespace // first character is "_", it's smallest - (Naoki Sawada) x = i(a).replace(sre, '').replace(/^_/, "\x01") || '', y = i(b).replace(sre, '').replace(/^_/, "\x01") || '', // chunk/tokenize xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), // numeric, hex or date detection xD = parseInt(x.match(hre)) || (xN.length != 1 && x.match(dre) && Date.parse(x)), yD = parseInt(y.match(hre)) || xD && y.match(dre) && Date.parse(y) || null, oFxNcL, oFyNcL, locRes = 0; // first try and sort Hex codes or Dates if (yD) { if ( xD < yD ) return -1; else if ( xD > yD ) return 1; } // natural sorting through split numeric strings and default strings for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) { // find floats not starting with '0', string or 0 if not defined (Clint Priest) oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0; oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0; // handle numeric vs string comparison - number < string - (Kyle Adams) // but symbol first < number - (Naoki Sawada) if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { if (isNaN(oFxNcL) && (typeof oFxNcL !== 'string' || ! oFxNcL.match(syre))) { return 1; } else if (typeof oFyNcL !== 'string' || ! oFyNcL.match(syre)) { return -1; } } // use decimal number comparison if either value is string zero if (parseInt(oFxNcL, 10) === 0) oFxNcL = 0; if (parseInt(oFyNcL, 10) === 0) oFyNcL = 0; // rely on string comparison if different types - i.e. '02' < 2 != '02' < '2' if (typeof oFxNcL !== typeof oFyNcL) { oFxNcL += ''; oFyNcL += ''; } // use locale sensitive sort for strings when case insensitive // note: localeCompare interleaves uppercase with lowercase (e.g. A,a,B,b) if (self.sort.insensitive && typeof oFxNcL === 'string' && typeof oFyNcL === 'string') { locRes = oFxNcL.localeCompare(oFyNcL, self.loc); if (locRes !== 0) return locRes; } if (oFxNcL < oFyNcL) return -1; if (oFxNcL > oFyNcL) return 1; } return 0; }; self.sort.insensitive = true; } } return self.sort(a, b); }, /** * Compare files based on elFinder.sort * * @param Object file * @param Object file * @return Number */ compare : function(file1, file2) { var self = this, type = self.sortType, asc = self.sortOrder == 'asc', stick = self.sortStickFolders, rules = self.sortRules, sort = rules[type], d1 = file1.mime == 'directory', d2 = file2.mime == 'directory', res; if (stick) { if (d1 && !d2) { return -1; } else if (!d1 && d2) { return 1; } } res = asc ? sort(file1, file2) : sort(file2, file1); return type !== 'name' && res === 0 ? res = asc ? rules.name(file1, file2) : rules.name(file2, file1) : res; }, /** * Sort files based on config * * @param Array files * @return Array */ sortFiles : function(files) { return files.sort(this.compare); }, /** * Open notification dialog * and append/update message for required notification type. * * @param Object options * @example * this.notify({ * type : 'copy', * msg : 'Copy files', // not required for known types @see this.notifyType * cnt : 3, * hideCnt : false, // true for not show count * progress : 10, // progress bar percents (use cnt : 0 to update progress bar) * cancel : callback // callback function for cancel button * }) * @return elFinder */ notify : function(opts) { var self = this, type = opts.type, id = opts.id? 'elfinder-notify-'+opts.id : '', msg = this.i18n((typeof opts.msg !== 'undefined')? opts.msg : (this.messages['ntf'+type] ? 'ntf'+type : 'ntfsmth')), hiddens = this.arrayFlip(this.options.notifyDialog.hiddens || []), ndialog = this.ui.notify, dialog = ndialog.closest('.ui-dialog'), notify = ndialog.children('.elfinder-notify-'+type+(id? ('.'+id) : '')), button = notify.children('div.elfinder-notify-cancel').children('button'), ntpl = '
{msg}
', delta = opts.cnt + 0, size = (typeof opts.size != 'undefined')? parseInt(opts.size) : null, progress = (typeof opts.progress != 'undefined' && opts.progress >= 0) ? opts.progress : null, fakeint = opts.fakeinterval || 200, cancel = opts.cancel, clhover = 'ui-state-hover', close = function() { var prog = notify.find('.elfinder-notify-progress'), rm = function() { notify.remove(); if (!ndialog.children(dialog.data('minimized')? void(0) : ':visible').length) { if (dialog.data('minimized')) { dialog.data('minimized').hide(); } else { ndialog.elfinderdialog('close'); } } setProgressbar(); }; notify._esc && $(document).off('keydown', notify._esc); if (notify.data('cur') < 100) { prog.animate({ width : '100%' }, 50, function() { requestAnimationFrame(function() { rm(); }); }); } else { rm(); } }, fakeUp = function(interval) { var cur; if (notify.length) { cur = notify.data('cur') + 1; if (cur <= 98) { notify.find('.elfinder-notify-progress').width(cur + '%'); notify.data('cur', cur); setProgressbar(); setTimeout(function() { interval *= 1.05; fakeUp(interval); }, interval); } } }, setProgressbar = function() { var cnt = 0, val = 0, ntfs = ndialog.children('.elfinder-notify'), w; if (ntfs.length) { ntfs.each(function() { cnt++; val += Math.min($(this).data('cur'), 100); }); w = cnt? Math.floor(val / (cnt * 100) * 100) + '%' : 0; self.ui.progressbar.width(w); if (dialog.data('minimized')) { dialog.data('minimized').title(w); dialog.data('minimized').dialog().children('.ui-dialog-titlebar').children('.elfinder-ui-progressbar').width(w); } } else { self.ui.progressbar.width(0); dialog.data('minimized') && dialog.data('minimized').hide(); } }, cnt, total, prc; if (!type) { return this; } if (!notify.length) { notify = $(ntpl.replace(/\{type\}/g, type).replace(/\{msg\}/g, msg)); if (hiddens[type]) { notify.hide(); } else { ndialog.on('minimize', function(e) { dialog.data('minimized') && setProgressbar(); }); } notify.appendTo(ndialog).data('cnt', 0); if (progress != null) { notify.data({progress : 0, total : 0, cur : 0}); } else { notify.data({cur : 0}); fakeUp(fakeint); } if (cancel) { button = $('') .on('mouseenter mouseleave', function(e) { $(this).toggleClass(clhover, e.type === 'mouseenter'); }); notify.children('div.elfinder-notify-cancel').append(button); } ndialog.trigger('resize'); } else if (typeof opts.msg !== 'undefined') { notify.children('span.elfinder-notify-msg').html(msg); } cnt = delta + parseInt(notify.data('cnt')); if (cnt > 0) { if (cancel && button.length) { if (typeof cancel === 'function' || (typeof cancel === 'object' && cancel.promise)) { notify._esc = function(e) { if (e.type == 'keydown' && e.keyCode != $.ui.keyCode.ESCAPE) { return; } e.preventDefault(); e.stopPropagation(); close(); if (cancel.promise) { cancel.reject(0); // 0 is canceling flag } else { cancel(e); } }; button.on('click', function(e) { notify._esc(e); }); $(document).on('keydown.' + this.namespace, notify._esc); } } !opts.hideCnt && notify.children('.elfinder-notify-cnt').text('('+cnt+')'); if (delta > 0 && ndialog.is(':hidden') && !hiddens[type]) { if (dialog.data('minimized')) { dialog.data('minimized').show(); } else { ndialog.elfinderdialog('open', this).height('auto'); } } notify.data('cnt', cnt); if ((progress != null) && (total = notify.data('total')) >= 0 && (prc = notify.data('progress')) >= 0) { total += size != null? size : delta; prc += progress; (size == null && delta < 0) && (prc += delta * 100); notify.data({progress : prc, total : total}); if (size != null) { prc *= 100; total = Math.max(1, total); } progress = Math.min(parseInt(prc/total), 100); notify.find('.elfinder-notify-progress') .animate({ width : (progress < 100 ? progress : 100)+'%' }, 20, function() { notify.data('cur', progress); setProgressbar(); }); } } else { close(); } return this; }, /** * Open confirmation dialog * * @param Object options * @example * this.confirm({ * cssClass : 'elfinder-confirm-mydialog', * title : 'Remove files', * text : 'Here is question text', * accept : { // accept callback - required * label : 'Continue', * callback : function(applyToAll) { fm.log('Ok') } * }, * cancel : { // cancel callback - required * label : 'Cancel', * callback : function() { fm.log('Cancel')} * }, * reject : { // reject callback - optionally * label : 'No', * callback : function(applyToAll) { fm.log('No')} * }, * buttons : [ // additional buttons callback - optionally * { * label : 'Btn1', * callback : function(applyToAll) { fm.log('Btn1')} * } * ], * all : true // display checkbox "Apply to all" * }) * @return elFinder */ confirm : function(opts) { var self = this, complete = false, options = { cssClass : 'elfinder-dialog-confirm', modal : true, resizable : false, title : this.i18n(opts.title || 'confirmReq'), buttons : {}, close : function() { !complete && opts.cancel.callback(); $(this).elfinderdialog('destroy'); } }, apply = this.i18n('apllyAll'), label, checkbox, btnNum; if (opts.cssClass) { options.cssClass += ' ' + opts.cssClass; } options.buttons[this.i18n(opts.accept.label)] = function() { opts.accept.callback(!!(checkbox && checkbox.prop('checked'))); complete = true; $(this).elfinderdialog('close'); }; options.buttons[this.i18n(opts.accept.label)]._cssClass = 'elfinder-confirm-accept'; if (opts.reject) { options.buttons[this.i18n(opts.reject.label)] = function() { opts.reject.callback(!!(checkbox && checkbox.prop('checked'))); complete = true; $(this).elfinderdialog('close'); }; options.buttons[this.i18n(opts.reject.label)]._cssClass = 'elfinder-confirm-reject'; } if (opts.buttons && opts.buttons.length > 0) { btnNum = 1; $.each(opts.buttons, function(i, v){ options.buttons[self.i18n(v.label)] = function() { v.callback(!!(checkbox && checkbox.prop('checked'))); complete = true; $(this).elfinderdialog('close'); }; options.buttons[self.i18n(v.label)]._cssClass = 'elfinder-confirm-extbtn' + (btnNum++); if (v.cssClass) { options.buttons[self.i18n(v.label)]._cssClass += ' ' + v.cssClass; } }); } options.buttons[this.i18n(opts.cancel.label)] = function() { $(this).elfinderdialog('close'); }; options.buttons[this.i18n(opts.cancel.label)]._cssClass = 'elfinder-confirm-cancel'; if (opts.all) { options.create = function() { var base = $('
'); checkbox = $(''); $(this).next().find('.ui-dialog-buttonset') .prepend(base.append($('').prepend(checkbox))); }; } if (opts.optionsCallback && typeof opts.optionsCallback === 'function') { opts.optionsCallback(options); } return this.dialog('' + this.i18n(opts.text), options); }, /** * Create unique file name in required dir * * @param String file name * @param String parent dir hash * @param String glue * @return String */ uniqueName : function(prefix, phash, glue) { var i = 0, ext = '', p, name; prefix = this.i18n(false, prefix); phash = phash || this.cwd().hash; glue = (typeof glue === 'undefined')? ' ' : glue; if (p = prefix.match(/^(.+)(\.[^.]+)$/)) { ext = p[2]; prefix = p[1]; } name = prefix+ext; if (!this.fileByName(name, phash)) { return name; } while (i < 10000) { name = prefix + glue + (++i) + ext; if (!this.fileByName(name, phash)) { return name; } } return prefix + Math.random() + ext; }, /** * Return message translated onto current language * Allowed accept HTML element that was wrapped in jQuery object * To be careful to XSS vulnerability of HTML element Ex. You should use `fm.escape(file.name)` * * @param String|Array message[s]|Object jQuery * @return String **/ i18n : function() { var self = this, messages = this.messages, input = [], ignore = [], message = function(m) { var file; if (m.indexOf('#') === 0) { if ((file = self.file(m.substr(1)))) { return file.name; } } return m; }, i, j, m, escFunc, start = 0, isErr; if (arguments.length && arguments[0] === false) { escFunc = function(m){ return m; }; start = 1; } for (i = start; i< arguments.length; i++) { m = arguments[i]; if (Array.isArray(m)) { for (j = 0; j < m.length; j++) { if (m[j] instanceof jQuery) { // jQuery object is HTML element input.push(m[j]); } else if (typeof m[j] !== 'undefined'){ input.push(message('' + m[j])); } } } else if (m instanceof jQuery) { // jQuery object is HTML element input.push(m[j]); } else if (typeof m !== 'undefined'){ input.push(message('' + m)); } } for (i = 0; i < input.length; i++) { // dont translate placeholders if ($.inArray(i, ignore) !== -1) { continue; } m = input[i]; if (typeof m == 'string') { isErr = !!(messages[m] && m.match(/^err/)); // translate message m = messages[m] || (escFunc? escFunc(m) : self.escape(m)); // replace placeholders in message m = m.replace(/\$(\d+)/g, function(match, placeholder) { var res; placeholder = i + parseInt(placeholder); if (placeholder > 0 && input[placeholder]) { ignore.push(placeholder); } res = escFunc? escFunc(input[placeholder]) : self.escape(input[placeholder]); if (isErr) { res = '' + res + ''; } return res; }); } else { // get HTML from jQuery object m = m.get(0).outerHTML; } input[i] = m; } return $.grep(input, function(m, i) { return $.inArray(i, ignore) === -1 ? true : false; }).join('
'); }, /** * Get icon style from file.icon * * @param Object elFinder file object * @return String|Object */ getIconStyle : function(file, asObject) { var self = this, template = { 'background' : 'url(\'{url}\') 0 0 no-repeat', 'background-size' : 'contain' }, style = '', cssObj = {}, i = 0; if (file.icon) { style = 'style="'; $.each(template, function(k, v) { if (i++ === 0) { v = v.replace('{url}', self.escape(file.icon)); } if (asObject) { cssObj[k] = v; } else { style += k+':'+v+';'; } }); style += '"'; } return asObject? cssObj : style; }, /** * Convert mimetype into css classes * * @param String file mimetype * @return String */ mime2class : function(mimeType) { var prefix = 'elfinder-cwd-icon-', mime = mimeType.toLowerCase(), isText = this.textMimes[mime]; mime = mime.split('/'); if (isText) { mime[0] += ' ' + prefix + 'text'; } else if (mime[1] && mime[1].match(/\+xml$/)) { mime[0] += ' ' + prefix + 'xml'; } return prefix + mime[0] + (mime[1] ? ' ' + prefix + mime[1].replace(/(\.|\+)/g, '-') : ''); }, /** * Return localized kind of file * * @param Object|String file or file mimetype * @return String */ mime2kind : function(f) { var isObj = typeof(f) == 'object' ? true : false, mime = isObj ? f.mime : f, kind; if (isObj && f.alias && mime != 'symlink-broken') { kind = 'Alias'; } else if (this.kinds[mime]) { if (isObj && mime === 'directory' && (! f.phash || f.isroot)) { kind = 'Root'; } else { kind = this.kinds[mime]; } } else if (this.mimeTypes[mime]) { kind = this.mimeTypes[mime].toUpperCase(); if (!this.messages['kind'+kind]) { kind = null; } } if (! kind) { if (mime.indexOf('text') === 0) { kind = 'Text'; } else if (mime.indexOf('image') === 0) { kind = 'Image'; } else if (mime.indexOf('audio') === 0) { kind = 'Audio'; } else if (mime.indexOf('video') === 0) { kind = 'Video'; } else if (mime.indexOf('application') === 0) { kind = 'App'; } else if (mime.indexOf('font') === 0) { kind = 'Font'; } else { kind = mime; } } return this.messages['kind'+kind] ? this.i18n('kind'+kind) : mime; }, /** * Return boolean Is mime-type text file * * @param String mime-type * @return Boolean */ mimeIsText : function(mime) { return (this.textMimes[mime.toLowerCase()] || (mime.indexOf('text/') === 0 && mime.substr(5, 3) !== 'rtf') || mime.match(/^application\/.+\+xml$/))? true : false; }, /** * Returns a date string formatted according to the given format string * * @param String format string * @param Object Date object * @return String */ date : function(format, date) { var self = this, output, d, dw, m, y, h, g, i, s; if (! date) { date = new Date(); } h = date[self.getHours](); g = h > 12 ? h - 12 : h; i = date[self.getMinutes](); s = date[self.getSeconds](); d = date[self.getDate](); dw = date[self.getDay](); m = date[self.getMonth]() + 1; y = date[self.getFullYear](); output = format.replace(/[a-z]/gi, function(val) { switch (val) { case 'd': return d > 9 ? d : '0'+d; case 'j': return d; case 'D': return self.i18n(self.i18.daysShort[dw]); case 'l': return self.i18n(self.i18.days[dw]); case 'm': return m > 9 ? m : '0'+m; case 'n': return m; case 'M': return self.i18n(self.i18.monthsShort[m-1]); case 'F': return self.i18n(self.i18.months[m-1]); case 'Y': return y; case 'y': return (''+y).substr(2); case 'H': return h > 9 ? h : '0'+h; case 'G': return h; case 'g': return g; case 'h': return g > 9 ? g : '0'+g; case 'a': return h >= 12 ? 'pm' : 'am'; case 'A': return h >= 12 ? 'PM' : 'AM'; case 'i': return i > 9 ? i : '0'+i; case 's': return s > 9 ? s : '0'+s; } return val; }); return output; }, /** * Return localized date * * @param Object file object * @return String */ formatDate : function(file, t) { var self = this, ts = t || file.ts, i18 = self.i18, date, format, output, d, dw, m, y, h, g, i, s; if (self.options.clientFormatDate && ts > 0) { date = new Date(ts*1000); format = ts >= this.yesterday ? this.fancyFormat : this.dateFormat; output = self.date(format, date); return ts >= this.yesterday ? output.replace('$1', this.i18n(ts >= this.today ? 'Today' : 'Yesterday')) : output; } else if (file.date) { return file.date.replace(/([a-z]+)\s/i, function(a1, a2) { return self.i18n(a2)+' '; }); } return self.i18n('dateUnknown'); }, /** * Return localized number string * * @param Number * @return String */ toLocaleString : function(num) { var v = new Number(num); if (v) { if (v.toLocaleString) { return v.toLocaleString(); } else { return String(num).replace( /(\d)(?=(\d\d\d)+(?!\d))/g, '$1,'); } } return num; }, /** * Return css class marks file permissions * * @param Object file * @return String */ perms2class : function(o) { var c = ''; if (!o.read && !o.write) { c = 'elfinder-na'; } else if (!o.read) { c = 'elfinder-wo'; } else if (!o.write) { c = 'elfinder-ro'; } if (o.type) { c += ' elfinder-' + this.escape(o.type); } return c; }, /** * Return localized string with file permissions * * @param Object file * @return String */ formatPermissions : function(f) { var p = []; f.read && p.push(this.i18n('read')); f.write && p.push(this.i18n('write')); return p.length ? p.join(' '+this.i18n('and')+' ') : this.i18n('noaccess'); }, /** * Return formated file size * * @param Number file size * @return String */ formatSize : function(s) { var n = 1, u = 'b'; if (s == 'unknown') { return this.i18n('unknown'); } if (s > 1073741824) { n = 1073741824; u = 'GB'; } else if (s > 1048576) { n = 1048576; u = 'MB'; } else if (s > 1024) { n = 1024; u = 'KB'; } s = s/n; return (s > 0 ? n >= 1048576 ? s.toFixed(2) : Math.round(s) : 0) +' '+u; }, /** * Return formated file mode by options.fileModeStyle * * @param String file mode * @param String format style * @return String */ formatFileMode : function(p, style) { var i, o, s, b, sticy, suid, sgid, str, oct; if (!style) { style = this.options.fileModeStyle.toLowerCase(); } p = p.trim(); if (p.match(/[rwxs-]{9}$/i)) { str = p = p.substr(-9); if (style == 'string') { return str; } oct = ''; s = 0; for (i=0; i<7; i=i+3) { o = p.substr(i, 3); b = 0; if (o.match(/[r]/i)) { b += 4; } if (o.match(/[w]/i)) { b += 2; } if (o.match(/[xs]/i)) { if (o.match(/[xs]/)) { b += 1; } if (o.match(/[s]/i)) { if (i == 0) { s += 4; } else if (i == 3) { s += 2; } } } oct += b.toString(8); } if (s) { oct = s.toString(8) + oct; } } else { p = parseInt(p, 8); oct = p? p.toString(8) : ''; if (!p || style == 'octal') { return oct; } o = p.toString(8); s = 0; if (o.length > 3) { o = o.substr(-4); s = parseInt(o.substr(0, 1), 8); o = o.substr(1); } sticy = ((s & 1) == 1); // not support sgid = ((s & 2) == 2); suid = ((s & 4) == 4); str = ''; for(i=0; i<3; i++) { if ((parseInt(o.substr(i, 1), 8) & 4) == 4) { str += 'r'; } else { str += '-'; } if ((parseInt(o.substr(i, 1), 8) & 2) == 2) { str += 'w'; } else { str += '-'; } if ((parseInt(o.substr(i, 1), 8) & 1) == 1) { str += ((i==0 && suid)||(i==1 && sgid))? 's' : 'x'; } else { str += '-'; } } } if (style == 'both') { return str + ' (' + oct + ')'; } else if (style == 'string') { return str; } else { return oct; } }, /** * Regist this.decodeRawString function * * @return void */ registRawStringDecoder : function(rawStringDecoder) { if (typeof rawStringDecoder === 'function') { this.decodeRawString = this.options.rawStringDecoder = rawStringDecoder; } }, /** * Return boolean that uploadable MIME type into target folder * * @param String mime MIME type * @param String target target folder hash * @return Bool */ uploadMimeCheck : function(mime, target) { target = target || this.cwd().hash; var res = true, // default is allow mimeChecker = this.option('uploadMime', target), allow, deny, check = function(checker) { var ret = false; if (typeof checker === 'string' && checker.toLowerCase() === 'all') { ret = true; } else if (Array.isArray(checker) && checker.length) { $.each(checker, function(i, v) { v = v.toLowerCase(); if (v === 'all' || mime.indexOf(v) === 0) { ret = true; return false; } }); } return ret; }; if (mime && $.isPlainObject(mimeChecker)) { mime = mime.toLowerCase(); allow = check(mimeChecker.allow); deny = check(mimeChecker.deny); if (mimeChecker.firstOrder === 'allow') { res = false; // default is deny if (! deny && allow === true) { // match only allow res = true; } } else { res = true; // default is allow if (deny === true && ! allow) { // match only deny res = false; } } } return res; }, /** * call chained sequence of async deferred functions * * @param Array tasks async functions * @return Object jQuery.Deferred */ sequence : function(tasks) { var l = tasks.length, chain = function(task, idx) { ++idx; if (tasks[idx]) { return chain(task.then(tasks[idx]), idx); } else { return task; } }; if (l > 1) { return chain(tasks[0](), 0); } else { return tasks[0](); } }, /** * Reload contents of target URL for clear browser cache * * @param String url target URL * @return Object jQuery.Deferred */ reloadContents : function(url) { var dfd = $.Deferred(), ifm; try { ifm = $(''; } } } link.remove(); $(iframes) .appendTo('body') .ready(function() { setTimeout(function() { $(iframes).each(function() { $('#' + $(this).attr('id')).remove(); }); }, 20000 + (10000 * i)); // give 20 sec + 10 sec for each file to be saved }); fm.trigger('download', {files : files}); dfrd.resolve(); }); fileCnt = files.length; urls = []; for (i = 0; i < files.length; i++) { fm.openUrl(files[i].hash, true, function(v) { v && urls.push(v); if (--fileCnt < 1) { getUrlDfrd.resolve(urls); } }); } return dfrd; } }; }; /* * File: /js/commands/duplicate.js */ /** * @class elFinder command "duplicate" * Create file/folder copy with suffix "copy Number" * * @type elFinder.command * @author Dmitry (dio) Levashov */ elFinder.prototype.commands.duplicate = function() { var fm = this.fm; this.getstate = function(select) { var sel = this.files(select), cnt = sel.length, filter = function(files) { var fres = true; return $.grep(files, function(f) { fres = fres && f.read && f.phash === fm.cwd().hash && ! fm.isRoot(f)? true : false; return fres; }); }; return cnt && fm.cwd().write && filter(sel).length == cnt ? 0 : -1; }; this.exec = function(hashes) { var fm = this.fm, files = this.files(hashes), cnt = files.length, dfrd = $.Deferred() .fail(function(error) { error && fm.error(error); }), args = []; if (! cnt) { return dfrd.reject(); } $.each(files, function(i, file) { if (!file.read || !fm.file(file.phash).write) { return !dfrd.reject(['errCopy', file.name, 'errPerm']); } }); if (dfrd.state() == 'rejected') { return dfrd; } return fm.request({ data : {cmd : 'duplicate', targets : this.hashes(hashes)}, notify : {type : 'copy', cnt : cnt}, navigate : { toast : { inbuffer : {msg: fm.i18n(['complete', fm.i18n('cmdduplicate')])} } } }); }; }; /* * File: /js/commands/edit.js */ /** * @class elFinder command "edit". * Edit text file in dialog window * * @author Dmitry (dio) Levashov, dio@std42.ru **/ elFinder.prototype.commands.edit = function() { var self = this, fm = this.fm, clsEditing = fm.res('class', 'editing'), mimesSingle = [], mimes = [], allowAll = false, rtrim = function(str){ return str.replace(/\s+$/, ''); }, getEncSelect = function(heads) { var sel = $(''), hval; if (heads) { $.each(heads, function(i, head) { hval = fm.escape(head.value); sel.append(''); }); } $.each(self.options.encodings, function(i, v) { sel.append(''); }); return sel; }, getDlgWidth = function() { var win = fm.options.dialogContained? fm.getUI() : $(window), m, width; if (typeof self.options.dialogWidth === 'string' && (m = self.options.dialogWidth.match(/(\d+)%/))) { width = parseInt(win.width() * (m[1] / 100)); } else { width = parseInt(self.options.dialogWidth || 650); } return Math.min(width, win.width()); }, getDlgHeight = function() { if (!self.options.dialogHeight) { return void(0); } var win = fm.options.dialogContained? fm.getUI() : $(window), m, height; if (typeof self.options.dialogHeight === 'string' && (m = self.options.dialogHeight.match(/(\d+)%/))) { height = parseInt(win.height() * (m[1] / 100)); } else { height = parseInt(self.options.dialogHeight || win.height()); } return Math.min(height, win.height()); }, /** * Return files acceptable to edit * * @param Array files hashes * @return Array **/ filter = function(files) { var cnt = files.length, mime, ext, skip; if (cnt > 1) { mime = files[0].mime; ext = files[0].name.replace(/^.*(\.[^.]+)$/, '$1'); } return $.grep(files, function(file) { var res; if (skip || file.mime === 'directory') { return false; } res = file.read && (allowAll || fm.mimeIsText(file.mime) || $.inArray(file.mime, cnt === 1? mimesSingle : mimes) !== -1) && (!self.onlyMimes.length || $.inArray(file.mime, self.onlyMimes) !== -1) && (cnt === 1 || (file.mime === mime && file.name.substr(ext.length * -1) === ext)) && (fm.uploadMimeCheck(file.mime, file.phash)? true : false) && setEditors(file, cnt) && Object.keys(editors).length; if (!res) { skip = true; } return res; }); }, fileSync = function(hash) { var old = fm.file(hash), f; fm.request({ cmd: 'info', targets: [hash], preventDefault: true }).done(function(data) { var changed; if (data && data.files && data.files.length) { f = data.files[0]; if (old.ts != f.ts || old.size != f.size) { changed = { changed: [ f ] }; fm.updateCache(changed); fm.change(changed); } } }); }, /** * Open dialog with textarea to edit file * * @param String id dialog id * @param Object file file object * @param String content file content * @return $.Deferred **/ dialog = function(id, file, content, encoding, editor, toasts) { var dfrd = $.Deferred(), _loaded = false, loaded = function() { if (!_loaded) { fm.toast({ mode: 'warning', msg: fm.i18n('nowLoading') }); return false; } return true; }, makeToasts = function() { // make toast message if (toasts && Array.isArray(toasts)) { $.each(toasts, function() { this.msg && fm.toast(this); }); } }, save = function() { var encord = selEncoding? selEncoding.val():void(0), saveDfd = $.Deferred().fail(function(err) { dialogNode.show().find('button.elfinder-btncnt-0,button.elfinder-btncnt-1').hide(); }), conf, res, tm; if (!loaded()) { return saveDfd.resolve(); } if (ta.editor) { ta.editor.save(ta[0], ta.editor.instance); conf = ta.editor.confObj; if (conf.info && (conf.info.schemeContent || conf.info.arrayBufferContent)) { encord = 'scheme'; } } res = getContent(); setOld(res); if (res.promise) { tm = setTimeout(function() { fm.notify({ type : 'chkcontent', cnt : 1, hideCnt: true, cancel : function() { res.reject(); } }); }, 100); res.always(function() { tm && clearTimeout(tm); fm.notify({ type : 'chkcontent', cnt: -1 }); }).done(function(data) { dfrd.notifyWith(ta, [encord, ta.data('hash'), old, saveDfd]); }).fail(function(err) { saveDfd.reject(err); }); } else { dfrd.notifyWith(ta, [encord, ta.data('hash'), old, saveDfd]); } return saveDfd; }, saveon = function() { if (!loaded()) { return; } save().fail(function(err) { err && fm.error(err); }); }, cancel = function() { if (!self.options.confirmUnsavedBeforeClose) { ta.elfinderdialog('close'); } else { var close = function() { var conf; dfrd.resolve(); if (ta.editor) { ta.editor.close(ta[0], ta.editor.instance); conf = ta.editor.confObj; if (conf.info && conf.info.syncInterval) { fileSync(file.hash); } } ta.elfinderdialog('destroy'); }, onlySaveAs = (typeof saveAsFile.name !== 'undefined'), accept = onlySaveAs? { label : 'btnSaveAs', callback : function() { requestAnimationFrame(saveAs); } } : { label : 'btnSaveClose', callback : function() { save().done(function() { close(); }); } }; changed().done(function(change) { var msgs = ['confirmNotSave']; var btnDiscard = { label : 'btnDiscard', callback : function() { close(); } } if (change) { if (typeof change === 'string') { msgs.unshift(change); } fm.confirm({ title : self.title, text : msgs, accept : accept, cancel : { label : 'btnCancel', callback : $.noop }, buttons : onlySaveAs? [btnDiscard] : [{ label : 'btnSaveAs', callback : function() { ta.elfinderdialog('destroy'); requestAnimationFrame(saveAs); } }, btnDiscard] }); } else { close(); } }); } }, savecl = function() { if (!loaded()) { return; } dialogNode.hide(); save().done(function() { _loaded = false; dialogNode.show(); cancel(); }).fail(function(err) { dialogNode.show(); err && fm.error(err); }); }, saveAs = function() { if (!loaded()) { return; } var prevOld = old, phash = file.phash, fail = function(err) { dialogs.addClass(clsEditing).fadeIn(function() { err && fm.error(err); }); old = prevOld; fm.disable(); }, make = function() { self.mime = saveAsFile.mime || file.mime; self.prefix = (saveAsFile.name || file.name).replace(/ \d+(\.[^.]+)?$/, '$1'); self.requestCmd = 'mkfile'; self.nextAction = {}; self.data = {target : phash}; fm.res('mixin', 'make').bind(self)() .done(function(data) { var oldHash; if (data.added && data.added.length) { oldHash = ta.data('hash'); ta.data('hash', data.added[0].hash); save().done(function() { _loaded = false; dialogNode.show(); cancel(); dialogs.fadeIn(); }).fail(function() { fm.exec('rm', [data.added[0].hash], { forceRm: true, quiet: true }); ta.data('hash', oldHash); dialogNode.find('button.elfinder-btncnt-2').hide(); fail(); }); } else { fail(); } }) .progress(function(err) { if (err && err === 'errUploadMime') { ta.trigger('saveAsFail'); } }) .fail(fail) .always(function() { delete self.mime; delete self.prefix; delete self.nextAction; delete self.data; }); fm.trigger('unselectfiles', { files: [ file.hash ] }); }, reqOpen = null, reqInfo = null, dialogs = fm.getUI().children('.' + self.dialogClass + ':visible'); if (dialogNode.is(':hidden')) { dialogs = dialogs.add(dialogNode); } dialogs.removeClass(clsEditing).fadeOut(); fm.enable(); if (fm.searchStatus.state < 2 && phash !== fm.cwd().hash) { reqOpen = fm.exec('open', [phash], {thash: phash}); } else if (!fm.file(phash)) { reqInfo = fm.request({cmd: 'info', targets: [phash]}); } $.when([reqOpen, reqInfo]).done(function() { if (reqInfo) { fm.one('infodone', function() { fm.file(phash)? make() : fail('errFolderNotFound'); }); } else { reqOpen? fm.one('cwdrender', make) : make(); } }).fail(fail); }, changed = function() { var dfd = $.Deferred(), res, tm; if (!_loaded) { return dfd.resolve(false); } ta.editor && ta.editor.save(ta[0], ta.editor.instance); res = getContent(); if (res && res.promise) { tm = setTimeout(function() { fm.notify({ type : 'chkcontent', cnt : 1, hideCnt: true, cancel : function() { res.reject(); } }); }, 100); res.always(function() { tm && clearTimeout(tm); fm.notify({ type : 'chkcontent', cnt: -1 }); }).done(function(d) { dfd.resolve(old !== d); }).fail(function(err) { dfd.resolve(err || (old === undefined? false : true)); }); } else { dfd.resolve(old !== res); } return dfd; }, opts = { title : fm.escape(file.name), width : getDlgWidth(), height : getDlgHeight(), buttons : {}, cssClass : clsEditing, maxWidth : 'window', maxHeight : 'window', allowMinimize : true, allowMaximize : true, openMaximized : editorMaximized() || (editor && editor.info && editor.info.openMaximized), btnHoverFocus : false, closeOnEscape : false, propagationEvents : ['mousemove', 'mouseup', 'click'], minimize : function() { var conf; if (ta.editor && dialogNode.closest('.ui-dialog').is(':hidden')) { conf = ta.editor.confObj; if (conf.info && conf.info.syncInterval) { fileSync(file.hash); } } }, headerBtnCloseAction : self.options.confirmUnsavedBeforeClose ? function() { cancel(); } : undefined, close : function() { if (self.options.confirmUnsavedBeforeClose) { return; } var close = function() { var conf; dfrd.resolve(); if (ta.editor) { ta.editor.close(ta[0], ta.editor.instance); conf = ta.editor.confObj; if (conf.info && conf.info.syncInterval) { fileSync(file.hash); } } ta.elfinderdialog('destroy'); }, onlySaveAs = (typeof saveAsFile.name !== 'undefined'), accept = onlySaveAs? { label : 'btnSaveAs', callback : function() { requestAnimationFrame(saveAs); } } : { label : 'btnSaveClose', callback : function() { save().done(function() { close(); }); } }; changed().done(function(change) { var msgs = ['confirmNotSave']; if (change) { if (typeof change === 'string') { msgs.unshift(change); } fm.confirm({ title : self.title, text : msgs, accept : accept, cancel : { label : 'btnClose', callback : close }, buttons : onlySaveAs? null : [{ label : 'btnSaveAs', callback : function() { requestAnimationFrame(saveAs); } }] }); } else { close(); } }); }, open : function() { var loadRes, conf, interval; ta.initEditArea.call(ta, id, file, content, fm); if (ta.editor) { loadRes = ta.editor.load(ta[0]) || null; if (loadRes && loadRes.done) { loadRes.always(function() { _loaded = true; }).done(function(instance) { ta.editor.instance = instance; ta.editor.focus(ta[0], ta.editor.instance); setOld(getContent()); requestAnimationFrame(function() { dialogNode.trigger('resize'); }); }).fail(function(error) { error && fm.error(error); ta.elfinderdialog('destroy'); return; }).always(makeToasts); } else { _loaded = true; if (loadRes && (typeof loadRes === 'string' || Array.isArray(loadRes))) { fm.error(loadRes); ta.elfinderdialog('destroy'); return; } ta.editor.instance = loadRes; ta.editor.focus(ta[0], ta.editor.instance); setOld(getContent()); requestAnimationFrame(function() { dialogNode.trigger('resize'); }); makeToasts(); } conf = ta.editor.confObj; if (conf.info && conf.info.syncInterval) { if (interval = parseInt(conf.info.syncInterval)) { setTimeout(function() { autoSync(interval); }, interval); } } } else { _loaded = true; setOld(getContent()); } }, resize : function(e, data) { ta.editor && ta.editor.resize(ta[0], ta.editor.instance, e, data || {}); } }, getContent = function() { var res = ta.getContent.call(ta, ta[0]); if (res === undefined || res === false || res === null) { res = $.Deferred().reject(); } return res; }, setOld = function(res) { if (res && res.promise) { res.done(function(d) { old = d; }); } else { old = res; } }, autoSync = function(interval) { if (dialogNode.is(':visible')) { fileSync(file.hash); setTimeout(function() { autoSync(interval); }, interval); } }, stateChange = function() { if (selEncoding) { changed().done(function(change) { if (change) { selEncoding.attr('title', fm.i18n('saveAsEncoding')).addClass('elfinder-edit-changed'); } else { selEncoding.attr('title', fm.i18n('openAsEncoding')).removeClass('elfinder-edit-changed'); } }); } }, saveAsFile = {}, ta, old, dialogNode, selEncoding, extEditor, maxW, syncInterval; if (editor) { if (editor.html) { ta = $(editor.html); } extEditor = { init : editor.init || null, load : editor.load, getContent : editor.getContent || null, save : editor.save, beforeclose : typeof editor.beforeclose == 'function' ? editor.beforeclose : void 0, close : typeof editor.close == 'function' ? editor.close : function() {}, focus : typeof editor.focus == 'function' ? editor.focus : function() {}, resize : typeof editor.resize == 'function' ? editor.resize : function() {}, instance : null, doSave : saveon, doCancel : cancel, doClose : savecl, file : file, fm : fm, confObj : editor, trigger : function(evName, data) { fm.trigger('editEditor' + evName, Object.assign({}, editor.info || {}, data)); } }; } if (!ta) { if (!fm.mimeIsText(file.mime)) { return dfrd.reject('errEditorNotFound'); } (function() { ta = $('') .on('input propertychange', stateChange); if (!editor || !editor.info || editor.info.useTextAreaEvent) { ta.on('keydown', function(e) { var code = e.keyCode, value, start; e.stopPropagation(); if (code == $.ui.keyCode.TAB) { e.preventDefault(); // insert tab on tab press if (this.setSelectionRange) { value = this.value; start = this.selectionStart; this.value = value.substr(0, start) + "\t" + value.substr(this.selectionEnd); start += 1; this.setSelectionRange(start, start); } } if (e.ctrlKey || e.metaKey) { // close on ctrl+w/q if (code == 'Q'.charCodeAt(0) || code == 'W'.charCodeAt(0)) { e.preventDefault(); cancel(); } if (code == 'S'.charCodeAt(0)) { e.preventDefault(); saveon(); } } }) .on('mouseenter', function(){this.focus();}); } ta.initEditArea = function(id, file, content) { // ta.hide() for performance tune. Need ta.show() in `load()` if use textarea node. ta.hide().val(content); this._setupSelEncoding(content); }; })(); } // extended function to setup selector of encoding for text editor ta._setupSelEncoding = function(content) { var heads = (encoding && encoding !== 'unknown')? [{value: encoding}] : [], wfake = $('').hide(), setSelW = function(init) { init && wfake.appendTo(selEncoding.parent()); wfake.empty().append($('').text(selEncoding.val())); selEncoding.width(wfake.width()); }; if (content === '' || ! encoding || encoding !== 'UTF-8') { heads.push({value: 'UTF-8'}); } selEncoding = getEncSelect(heads).on('touchstart', function(e) { // for touch punch event handler e.stopPropagation(); }).on('change', function() { // reload to change encoding if not edited changed().done(function(change) { if (! change && getContent() !== '') { cancel(); edit(file, selEncoding.val(), editor).fail(function(err) { err && fm.error(err); }); } }); setSelW(); }).on('mouseover', stateChange); ta.parent().next().prepend($('
').append(selEncoding)); setSelW(true); }; ta.data('hash', file.hash); if (extEditor) { ta.editor = extEditor; if (typeof extEditor.beforeclose === 'function') { opts.beforeclose = function() { return extEditor.beforeclose(ta[0], extEditor.instance); }; } if (typeof extEditor.init === 'function') { ta.initEditArea = extEditor.init; } if (typeof extEditor.getContent === 'function') { ta.getContent = extEditor.getContent; } } if (! ta.initEditArea) { ta.initEditArea = function() {}; } if (! ta.getContent) { ta.getContent = function() { return rtrim(ta.val()); }; } if (!editor || !editor.info || !editor.info.preventGet) { opts.buttons[fm.i18n('btnSave')] = saveon; opts.buttons[fm.i18n('btnSaveClose')] = savecl; opts.buttons[fm.i18n('btnSaveAs')] = saveAs; opts.buttons[fm.i18n('btnCancel')] = cancel; } if (editor && typeof editor.prepare === 'function') { editor.prepare(ta, opts, file); } dialogNode = self.fmDialog(ta, opts) .attr('id', id) .on('keydown keyup keypress', function(e) { e.stopPropagation(); }) .css({ overflow: 'hidden', minHeight: '7em' }) .addClass('elfinder-edit-editor') .closest('.ui-dialog') .on('changeType', function(e, data) { if (data.extention && data.mime) { var ext = data.extention, mime = data.mime, btnSet = $(this).children('.ui-dialog-buttonpane').children('.ui-dialog-buttonset'); btnSet.children('.elfinder-btncnt-0,.elfinder-btncnt-1').hide(); saveAsFile.name = fm.splitFileExtention(file.name)[0] + '.' + data.extention; saveAsFile.mime = data.mime; if (!data.keepEditor) { btnSet.children('.elfinder-btncnt-2').trigger('click'); } } }); // care to viewport scale change with mobile devices maxW = (fm.options.dialogContained? fm.getUI() : $(window)).width(); (dialogNode.width() > maxW) && dialogNode.width(maxW); return dfrd.promise(); }, /** * Get file content and * open dialog with textarea to edit file content * * @param String file hash * @return jQuery.Deferred **/ edit = function(file, convert, editor) { var hash = file.hash, opts = fm.options, dfrd = $.Deferred(), id = 'edit-'+fm.namespace+'-'+file.hash, d = fm.getUI().find('#'+id), conv = !convert? 0 : convert, noContent = false, req, error, res; if (d.length) { d.elfinderdialog('toTop'); return dfrd.resolve(); } if (!file.read || (!file.write && (!editor.info || !editor.info.converter))) { error = ['errOpen', file.name, 'errPerm']; return dfrd.reject(error); } if (editor && editor.info) { if (typeof editor.info.edit === 'function') { res = editor.info.edit.call(fm, file, editor); if (res.promise) { res.done(function() { dfrd.resolve(); }).fail(function(error) { dfrd.reject(error); }); } else { res? dfrd.resolve() : dfrd.reject(); } return dfrd; } noContent = editor.info.preventGet || editor.info.noContent; if (editor.info.urlAsContent || noContent) { req = $.Deferred(); if (editor.info.urlAsContent) { fm.url(hash, { async: true, onetime: true, temporary: true }).done(function(url) { req.resolve({content: url}); }); } else { req.resolve({}); } } else { if (conv) { file.encoding = conv; fm.cache(file, 'change'); } req = fm.request({ data : {cmd : 'get', target : hash, conv : conv, _t : file.ts}, options : {type: 'get', cache : true}, notify : {type : 'file', cnt : 1}, preventDefault : true }); } req.done(function(data) { var selEncoding, reg, m, res; if (data.doconv) { fm.confirm({ title : self.title, text : data.doconv === 'unknown'? 'confirmNonUTF8' : 'confirmConvUTF8', accept : { label : 'btnConv', callback : function() { dfrd = edit(file, selEncoding.val(), editor); } }, cancel : { label : 'btnCancel', callback : function() { dfrd.reject(); } }, optionsCallback : function(options) { options.create = function() { var base = $('
'), head = {value: data.doconv}, detected; if (data.doconv === 'unknown') { head.caption = '-'; } selEncoding = getEncSelect([head]); $(this).next().find('.ui-dialog-buttonset') .prepend(base.append($('').append(selEncoding))); }; } }); } else { if (!noContent && fm.mimeIsText(file.mime)) { reg = new RegExp('^(data:'+file.mime.replace(/([.+])/g, '\\$1')+';base64,)', 'i'); if (!editor.info.dataScheme) { if (window.atob && (m = data.content.match(reg))) { data.content = atob(data.content.substr(m[1].length)); } } else { if (window.btoa && !data.content.match(reg)) { data.content = 'data:'+file.mime+';base64,'+btoa(data.content); } } } dialog(id, file, data.content, data.encoding, editor, data.toasts) .done(function(data) { dfrd.resolve(data); }) .progress(function(encoding, newHash, data, saveDfd) { var ta = this; if (newHash) { hash = newHash; } fm.request({ options : {type : 'post'}, data : { cmd : 'put', target : hash, encoding : encoding || data.encoding, content : data }, notify : {type : 'save', cnt : 1}, syncOnFail : true, preventFail : true, navigate : { target : 'changed', toast : { inbuffer : {msg: fm.i18n(['complete', fm.i18n('btnSave')])} } } }) .fail(function(error) { dfrd.reject(error); saveDfd.reject(); }) .done(function(data) { requestAnimationFrame(function(){ ta.trigger('focus'); ta.editor && ta.editor.focus(ta[0], ta.editor.instance); }); saveDfd.resolve(); }); }) .fail(function(error) { dfrd.reject(error); }); } }) .fail(function(error) { var err = fm.parseError(error); err = Array.isArray(err)? err[0] : err; if (file.encoding) { file.encoding = ''; fm.cache(file, 'change'); } (err !== 'errConvUTF8') && fm.sync(); dfrd.reject(error); }); } return dfrd.promise(); }, /** * Current editors of selected files * * @type Object */ editors = {}, /** * Fallback editor (Simple text editor) * * @type Object */ fallbackEditor = { // Simple Text (basic textarea editor) info : { id : 'textarea', name : 'TextArea', useTextAreaEvent : true }, load : function(textarea) { // trigger event 'editEditorPrepare' this.trigger('Prepare', { node: textarea, editorObj: void(0), instance: void(0), opts: {} }); textarea.setSelectionRange && textarea.setSelectionRange(0, 0); $(textarea).trigger('focus').show(); }, save : function(){} }, /** * Set current editors * * @param Object file object * @param Number cnt count of selected items * @return Void */ setEditors = function(file, cnt) { var mimeMatch = function(fileMime, editorMimes){ if (!editorMimes) { return fm.mimeIsText(fileMime); } else { if (editorMimes[0] === '*' || $.inArray(fileMime, editorMimes) !== -1) { return true; } var i, l; l = editorMimes.length; for (i = 0; i < l; i++) { if (fileMime.indexOf(editorMimes[i]) === 0) { return true; } } return false; } }, extMatch = function(fileName, editorExts){ if (!editorExts || !editorExts.length) { return true; } var ext = fileName.replace(/^.+\.([^.]+)|(.+)$/, '$1$2').toLowerCase(), i, l; l = editorExts.length; for (i = 0; i < l; i++) { if (ext === editorExts[i].toLowerCase()) { return true; } } return false; }, optEditors = self.options.editors || [], cwdWrite = fm.cwd().write; stored = fm.storage('storedEditors') || {}; editors = {}; if (!optEditors.length) { optEditors = [fallbackEditor]; } $.each(optEditors, function(i, editor) { var name; if ((cnt === 1 || !editor.info.single) && ((!editor.info || !editor.info.converter)? file.write : cwdWrite) && (file.size > 0 || (!editor.info.converter && editor.info.canMakeEmpty !== false && fm.mimesCanMakeEmpty[file.mime])) && (!editor.info.maxSize || file.size <= editor.info.maxSize) && mimeMatch(file.mime, editor.mimes || null) && extMatch(file.name, editor.exts || null) && typeof editor.load == 'function' && typeof editor.save == 'function') { name = editor.info.name? editor.info.name : ('Editor ' + i); editor.id = editor.info.id? editor.info.id : ('editor' + i), editor.name = name; editor.i18n = fm.i18n(name); editors[editor.id] = editor; } }); return Object.keys(editors).length? true : false; }, store = function(mime, editor) { if (mime && editor) { if (!$.isPlainObject(stored)) { stored = {}; } stored[mime] = editor.id; fm.storage('storedEditors', stored); fm.trigger('selectfiles', {files : fm.selected()}); } }, useStoredEditor = function() { var d = fm.storage('useStoredEditor'); return d? (d > 0) : self.options.useStoredEditor; }, editorMaximized = function() { var d = fm.storage('editorMaximized'); return d? (d > 0) : self.options.editorMaximized; }, getSubMenuRaw = function(files, callback) { var subMenuRaw = []; $.each(editors, function(id, ed) { subMenuRaw.push( { label : fm.escape(ed.i18n), icon : ed.info && ed.info.icon? ed.info.icon : 'edit', options : { iconImg: ed.info && ed.info.iconImg? fm.baseUrl + ed.info.iconImg : void(0) }, callback : function() { store(files[0].mime, ed); callback && callback.call(ed); } } ); }); return subMenuRaw; }, getStoreId = function(name) { // for compatibility to previous version return name.toLowerCase().replace(/ +/g, ''); }, getStoredEditor = function(mime) { var name = stored[mime]; return name && Object.keys(editors).length? editors[getStoreId(name)] : void(0); }, infoRequest = function() { }, stored; // make public method this.getEncSelect = getEncSelect; this.shortcuts = [{ pattern : 'ctrl+e' }]; this.init = function() { var self = this, fm = this.fm, opts = this.options, cmdChecks = [], ccData, dfd; this.onlyMimes = this.options.mimes || []; fm.one('open', function() { // editors setup if (opts.editors && Array.isArray(opts.editors)) { fm.trigger('canMakeEmptyFile', {mimes: Object.keys(fm.storage('mkfileTextMimes') || {}).concat(opts.makeTextMimes || ['text/plain'])}); $.each(opts.editors, function(i, editor) { if (editor.info && editor.info.cmdCheck) { cmdChecks.push(editor.info.cmdCheck); } }); if (cmdChecks.length) { if (fm.api >= 2.1030) { dfd = fm.request({ data : { cmd: 'editor', name: cmdChecks, method: 'enabled' }, preventDefault : true }).done(function(d) { ccData = d; }).fail(function() { ccData = {}; }); } else { ccData = {}; dfd = $.Deferred().resolve(); } } else { dfd = $.Deferred().resolve(); } dfd.always(function() { if (ccData) { opts.editors = $.grep(opts.editors, function(e) { if (e.info && e.info.cmdCheck) { return ccData[e.info.cmdCheck]? true : false; } else { return true; } }); } $.each(opts.editors, function(i, editor) { if (editor.setup && typeof editor.setup === 'function') { editor.setup.call(editor, opts, fm); } if (!editor.disabled) { if (editor.mimes && Array.isArray(editor.mimes)) { mimesSingle = mimesSingle.concat(editor.mimes); if (!editor.info || !editor.info.single) { mimes = mimes.concat(editor.mimes); } } if (!allowAll && editor.mimes && editor.mimes[0] === '*') { allowAll = true; } if (!editor.info) { editor.info = {}; } if (editor.info.integrate) { fm.trigger('helpIntegration', Object.assign({cmd: 'edit'}, editor.info.integrate)); } if (editor.info.canMakeEmpty) { fm.trigger('canMakeEmptyFile', {mimes: Array.isArray(editor.info.canMakeEmpty)? editor.info.canMakeEmpty : editor.mimes}); } } }); mimesSingle = ($.uniqueSort || $.unique)(mimesSingle); mimes = ($.uniqueSort || $.unique)(mimes); opts.editors = $.grep(opts.editors, function(e) { return e.disabled? false : true; }); }); } }) .bind('select', function() { editors = null; }) .bind('contextmenucreate', function(e) { var file, editor, single = function(editor) { var title = self.title; fm.one('contextmenucreatedone', function() { self.title = title; }); self.title = fm.escape(editor.i18n); if (editor.info && editor.info.iconImg) { self.contextmenuOpts = { iconImg: fm.baseUrl + editor.info.iconImg }; } delete self.variants; }; self.contextmenuOpts = void(0); if (e.data.type === 'files' && self.enabled()) { file = fm.file(e.data.targets[0]); if (setEditors(file, e.data.targets.length)) { if (Object.keys(editors).length > 1) { if (!useStoredEditor() || !(editor = getStoredEditor(file.mime))) { delete self.extra; self.variants = []; $.each(editors, function(id, editor) { self.variants.push([{ editor: editor }, editor.i18n, editor.info && editor.info.iconImg? fm.baseUrl + editor.info.iconImg : 'edit']); }); } else { single(editor); self.extra = { icon: 'menu', node: $('') .attr({title: fm.i18n('select')}) .on('click touchstart', function(e){ if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) { return; } var node = $(this); e.stopPropagation(); e.preventDefault(); fm.trigger('contextmenu', { raw: getSubMenuRaw(fm.selectedFiles(), function() { var hashes = fm.selected(); fm.exec('edit', hashes, {editor: this}); fm.trigger('selectfiles', {files : hashes}); }), x: node.offset().left, y: node.offset().top }); }) }; } } else { single(editors[Object.keys(editors)[0]]); delete self.extra; } } } }) .bind('canMakeEmptyFile', function(e) { if (e.data && e.data.resetTexts) { var defs = fm.arrayFlip(self.options.makeTextMimes || ['text/plain']), hides = self.getMkfileHides(); $.each((fm.storage('mkfileTextMimes') || {}), function(mime, type) { if (!defs[mime]) { delete fm.mimesCanMakeEmpty[mime]; delete hides[mime]; } }); fm.storage('mkfileTextMimes', null); if (Object.keys(hides).length) { fm.storage('mkfileHides', hides); } else { fm.storage('mkfileHides', null); } } }); }; this.getstate = function(select) { var sel = this.files(select), cnt = sel.length; return cnt && filter(sel).length == cnt ? 0 : -1; }; this.exec = function(select, opts) { var fm = this.fm, files = filter(this.files(select)), hashes = $.map(files, function(f) { return f.hash; }), list = [], editor = opts && opts.editor? opts.editor : null, node = $(opts && opts._currentNode? opts._currentNode : fm.cwdHash2Elm(hashes[0])), getEditor = function() { var dfd = $.Deferred(), storedId; if (!editor && Object.keys(editors).length > 1) { if (useStoredEditor() && (editor = getStoredEditor(files[0].mime))) { return dfd.resolve(editor); } fm.trigger('contextmenu', { raw: getSubMenuRaw(files, function() { dfd.resolve(this); }), x: node.offset().left, y: node.offset().top + 22, opened: function() { fm.one('closecontextmenu',function() { requestAnimationFrame(function() { if (dfd.state() === 'pending') { dfd.reject(); } }); }); } }); fm.trigger('selectfiles', {files : hashes}); return dfd; } else { Object.keys(editors).length > 1 && editor && store(files[0].mime, editor); return dfd.resolve(editor? editor : (Object.keys(editors).length? editors[Object.keys(editors)[0]] : null)); } }, dfrd = $.Deferred(), file; if (editors === null) { setEditors(files[0], hashes.length); } if (!node.length) { node = fm.getUI('cwd'); } getEditor().done(function(editor) { while ((file = files.shift())) { list.push(edit(file, (file.encoding || void(0)), editor).fail(function(error) { error && fm.error(error); })); } if (list.length) { $.when.apply(null, list).done(function() { dfrd.resolve(); }).fail(function() { dfrd.reject(); }); } else { dfrd.reject(); } }).fail(function() { dfrd.reject(); }); return dfrd; }; this.getMkfileHides = function() { return fm.storage('mkfileHides') || fm.arrayFlip(self.options.mkfileHideMimes || []); }; }; /* * File: /js/commands/empty.js */ /** * @class elFinder command "empty". * Empty the folder * * @type elFinder.command * @author Naoki Sawada */ elFinder.prototype.commands.empty = function() { var self, fm, selFiles = function(select) { var sel = self.files(select); if (!sel.length) { sel = [ fm.cwd() ]; } return sel; }; this.linkedCmds = ['rm']; this.init = function() { // lazy assign to make possible to become superclass self = this; fm = this.fm; }; this.getstate = function(select) { var sel = selFiles(select), cnt, filter = function(files) { var fres = true; return $.grep(files, function(f) { fres = fres && f.read && f.write && f.mime === 'directory' ? true : false; return fres; }); }; cnt = sel.length; return filter(sel).length == cnt ? 0 : -1; }; this.exec = function(hashes) { var dirs = selFiles(hashes), cnt = dirs.length, dfrd = $.Deferred() .done(function() { var data = {changed: {}}; fm.toast({msg: fm.i18n(['"'+success.join('", ')+'"', 'complete', fm.i18n('cmdempty')])}); $.each(dirs, function(i, dir) { data.changed[dir.hash] = dir; }); fm.change(data); }) .always(function() { var cwd = fm.cwd().hash; fm.trigger('selectfiles', {files: $.map(dirs, function(d) { return cwd === d.phash? d.hash : null; })}); }), success = [], done = function(res) { if (typeof res === 'number') { success.push(dirs[res].name); delete dirs[res].dirs; } else { res && fm.error(res); } (--cnt < 1) && dfrd[success.length? 'resolve' : 'reject'](); }; $.each(dirs, function(i, dir) { var tm; if (!(dir.write && dir.mime === 'directory')) { done(['errEmpty', dir.name, 'errPerm']); return null; } if (!fm.isCommandEnabled('rm', dir.hash)) { done(['errCmdNoSupport', '"rm"']); return null; } tm = setTimeout(function() { fm.notify({type : 'search', cnt : 1, hideCnt : cnt > 1? false : true}); }, fm.notifyDelay); fm.request({ data : {cmd : 'open', target : dir.hash}, preventDefault : true, asNotOpen : true }).done(function(data) { var targets = []; tm && clearTimeout(tm); if (fm.ui.notify.children('.elfinder-notify-search').length) { fm.notify({type : 'search', cnt : -1, hideCnt : cnt > 1? false : true}); } if (data && data.files && data.files.length) { if (data.files.length > fm.maxTargets) { done(['errEmpty', dir.name, 'errMaxTargets', fm.maxTargets]); } else { fm.updateCache(data); $.each(data.files, function(i, f) { if (!f.write || f.locked) { done(['errEmpty', dir.name, 'errRm', f.name, 'errPerm']); targets = []; return false; } targets.push(f.hash); }); if (targets.length) { fm.exec('rm', targets, { _userAction : true, addTexts : [ fm.i18n('folderToEmpty', dir.name) ] }) .fail(function(error) { fm.trigger('unselectfiles', {files: fm.selected()}); done(fm.parseError(error) || ''); }) .done(function() { done(i); }); } } } else { fm.toast({ mode: 'warning', msg: fm.i18n('filderIsEmpty', dir.name)}); done(''); } }).fail(function(error) { done(fm.parseError(error) || ''); }); }); return dfrd; }; }; /* * File: /js/commands/extract.js */ /** * @class elFinder command "extract" * Extract files from archive * * @author Dmitry (dio) Levashov **/ elFinder.prototype.commands.extract = function() { var self = this, fm = self.fm, mimes = [], filter = function(files) { var fres = true; return $.grep(files, function(file) { fres = fres && file.read && $.inArray(file.mime, mimes) !== -1 ? true : false; return fres; }); }; this.variants = []; this.disableOnSearch = true; // Update mimes list on open/reload fm.bind('open reload', function() { mimes = fm.option('archivers')['extract'] || []; if (fm.api > 2) { self.variants = [[{makedir: true}, fm.i18n('cmdmkdir')], [{}, fm.i18n('btnCwd')]]; } else { self.variants = [[{}, fm.i18n('btnCwd')]]; } self.change(); }); this.getstate = function(select) { var sel = this.files(select), cnt = sel.length, cwdHash, cwdChk; if (!cnt || filter(sel).length != cnt) { return -1; } else if (fm.searchStatus.state > 0) { cwdHash = this.fm.cwd().hash; $.each(sel, function(i, file) { cwdChk = (file.phash === cwdHash); return cwdChk; }); return cwdChk? 0 : -1; } else { return this.fm.cwd().write? 0 : -1; } }; this.exec = function(hashes, opts) { var files = this.files(hashes), dfrd = $.Deferred(), cnt = files.length, makedir = opts && opts.makedir ? 1 : 0, i, error, decision, overwriteAll = false, omitAll = false, mkdirAll = 0, siblings = fm.files(files[0].phash), names = [], map = {}; $.each(siblings, function(id, file) { map[file.name] = file; names.push(file.name); }); var decide = function(decision) { switch (decision) { case 'overwrite_all' : overwriteAll = true; break; case 'omit_all': omitAll = true; break; } }; var unpack = function(file) { if (!(file.read && fm.file(file.phash).write)) { error = ['errExtract', file.name, 'errPerm']; fm.error(error); dfrd.reject(error); } else if ($.inArray(file.mime, mimes) === -1) { error = ['errExtract', file.name, 'errNoArchive']; fm.error(error); dfrd.reject(error); } else { fm.request({ data:{cmd:'extract', target:file.hash, makedir:makedir}, notify:{type:'extract', cnt:1}, syncOnFail:true, navigate:{ toast : makedir? { incwd : {msg: fm.i18n(['complete', fm.i18n('cmdextract')]), action: {cmd: 'open', msg: 'cmdopen'}}, inbuffer : {msg: fm.i18n(['complete', fm.i18n('cmdextract')]), action: {cmd: 'open', msg: 'cmdopen'}} } : { inbuffer : {msg: fm.i18n(['complete', fm.i18n('cmdextract')])} } } }) .fail(function (error) { if (dfrd.state() != 'rejected') { dfrd.reject(error); } }) .done(function () { }); } }; var confirm = function(files, index) { var file = files[index], name = fm.splitFileExtention(file.name)[0], existed = ($.inArray(name, names) >= 0), next = function(){ if((index+1) < cnt) { confirm(files, index+1); } else { dfrd.resolve(); } }; if (!makedir && existed && map[name].mime != 'directory') { fm.confirm( { title : fm.i18n('ntfextract'), text : ['errExists', name, 'confirmRepl'], accept:{ label : 'btnYes', callback:function (all) { decision = all ? 'overwrite_all' : 'overwrite'; decide(decision); if(!overwriteAll && !omitAll) { if('overwrite' == decision) { unpack(file); } if((index+1) < cnt) { confirm(files, index+1); } else { dfrd.resolve(); } } else if(overwriteAll) { for (i = index; i < cnt; i++) { unpack(files[i]); } dfrd.resolve(); } } }, reject : { label : 'btnNo', callback:function (all) { decision = all ? 'omit_all' : 'omit'; decide(decision); if(!overwriteAll && !omitAll && (index+1) < cnt) { confirm(files, index+1); } else if (omitAll) { dfrd.resolve(); } } }, cancel : { label : 'btnCancel', callback:function () { dfrd.resolve(); } }, all : ((index+1) < cnt) } ); } else if (!makedir) { if (mkdirAll == 0) { fm.confirm({ title : fm.i18n('cmdextract'), text : [fm.i18n('cmdextract')+' "'+file.name+'"', 'confirmRepl'], accept:{ label : 'btnYes', callback:function (all) { all && (mkdirAll = 1); unpack(file); next(); } }, reject : { label : 'btnNo', callback:function (all) { all && (mkdirAll = -1); next(); } }, cancel : { label : 'btnCancel', callback:function () { dfrd.resolve(); } }, all : ((index+1) < cnt) }); } else { (mkdirAll > 0) && unpack(file); next(); } } else { unpack(file); next(); } }; if (!(this.enabled() && cnt && mimes.length)) { return dfrd.reject(); } if(cnt > 0) { confirm(files, 0); } return dfrd; }; }; /* * File: /js/commands/forward.js */ /** * @class elFinder command "forward" * Open next visited folder * * @author Dmitry (dio) Levashov **/ (elFinder.prototype.commands.forward = function() { this.alwaysEnabled = true; this.updateOnSelect = true; this.shortcuts = [{ pattern : 'ctrl+right' }]; this.getstate = function() { return this.fm.history.canForward() ? 0 : -1; }; this.exec = function() { return this.fm.history.forward(); }; }).prototype = { forceLoad : true }; // this is required command /* * File: /js/commands/fullscreen.js */ /** * @class elFinder command "fullscreen" * elFinder node to full scrren mode * * @author Naoki Sawada **/ elFinder.prototype.commands.fullscreen = function() { var self = this, fm = this.fm, update = function(e, data) { var full; e.preventDefault(); e.stopPropagation(); if (data && data.fullscreen) { full = (data.fullscreen === 'on'); self.update(void(0), full); self.title = fm.i18n(full ? 'reinstate' : 'cmdfullscreen'); } }; this.alwaysEnabled = true; this.updateOnSelect = false; this.syncTitleOnChange = true; this.value = false; this.options = { ui : 'fullscreenbutton' }; this.getstate = function() { return 0; }; this.exec = function() { var node = fm.getUI().get(0), full = (node === fm.toggleFullscreen(node)); self.title = fm.i18n(full ? 'reinstate' : 'cmdfullscreen'); self.update(void(0), full); return $.Deferred().resolve(); }; fm.bind('init', function() { fm.getUI().off('resize.' + fm.namespace, update).on('resize.' + fm.namespace, update); }); }; /* * File: /js/commands/getfile.js */ /** * @class elFinder command "getfile". * Return selected files info into outer callback. * For use elFinder with wysiwyg editors etc. * * @author Dmitry (dio) Levashov, dio@std42.ru **/ (elFinder.prototype.commands.getfile = function() { var self = this, fm = this.fm, filter = function(files) { var o = self.options, fres = true; files = $.grep(files, function(file) { fres = fres && (file.mime != 'directory' || o.folders) && file.read ? true : false; return fres; }); return o.multiple || files.length == 1 ? files : []; }; this.alwaysEnabled = true; this.callback = fm.options.getFileCallback; this._disabled = typeof(this.callback) == 'function'; this.getstate = function(select) { var sel = this.files(select), cnt = sel.length; return this.callback && cnt && filter(sel).length == cnt ? 0 : -1; }; this.exec = function(hashes) { var fm = this.fm, opts = this.options, files = this.files(hashes), cnt = files.length, url = fm.option('url'), tmb = fm.option('tmbUrl'), dfrd = $.Deferred() .done(function(data) { var res, done = function() { if (opts.oncomplete == 'close') { fm.hide(); } else if (opts.oncomplete == 'destroy') { fm.destroy(); } }, fail = function(error) { if (opts.onerror == 'close') { fm.hide(); } else if (opts.onerror == 'destroy') { fm.destroy(); } else { error && fm.error(error); } }; fm.trigger('getfile', {files : data}); try { res = self.callback(data, fm); } catch(e) { fail(['Error in `getFileCallback`.', e.message]); return; } if (typeof res === 'object' && typeof res.done === 'function') { res.done(done).fail(fail); } else { done(); } }), result = function(file) { return opts.onlyURL ? opts.multiple ? $.map(files, function(f) { return f.url; }) : files[0].url : opts.multiple ? files : files[0]; }, req = [], i, file, dim; for (i = 0; i < cnt; i++) { file = files[i]; if (file.mime == 'directory' && !opts.folders) { return dfrd.reject(); } file.baseUrl = url; if (file.url == '1') { req.push(fm.request({ data : {cmd : 'url', target : file.hash}, notify : {type : 'url', cnt : 1, hideCnt : true}, preventDefault : true }) .done(function(data) { if (data.url) { var rfile = fm.file(this.hash); rfile.url = this.url = data.url; } }.bind(file))); } else { file.url = fm.url(file.hash); } if (! opts.onlyURL) { if (opts.getPath) { file.path = fm.path(file.hash); if (file.path === '' && file.phash) { // get parents (function() { var dfd = $.Deferred(); req.push(dfd); fm.path(file.hash, false, {}) .done(function(path) { file.path = path; }) .fail(function() { file.path = ''; }) .always(function() { dfd.resolve(); }); })(); } } if (file.tmb && file.tmb != 1) { file.tmb = tmb + file.tmb; } if (!file.width && !file.height) { if (file.dim) { dim = file.dim.split('x'); file.width = dim[0]; file.height = dim[1]; } else if (opts.getImgSize && file.mime.indexOf('image') !== -1) { req.push(fm.request({ data : {cmd : 'dim', target : file.hash}, notify : {type : 'dim', cnt : 1, hideCnt : true}, preventDefault : true }) .done(function(data) { if (data.dim) { var dim = data.dim.split('x'); var rfile = fm.file(this.hash); rfile.width = this.width = dim[0]; rfile.height = this.height = dim[1]; } }.bind(file))); } } } } if (req.length) { $.when.apply(null, req).always(function() { dfrd.resolve(result(files)); }); return dfrd; } return dfrd.resolve(result(files)); }; }).prototype = { forceLoad : true }; // this is required command /* * File: /js/commands/help.js */ /** * @class elFinder command "help" * "About" dialog * * @author Dmitry (dio) Levashov **/ (elFinder.prototype.commands.help = function() { var fm = this.fm, self = this, linktpl = '', linktpltgt = '', atpl = '
{author}
{work}
', url = /\{url\}/, link = /\{link\}/, author = /\{author\}/, work = /\{work\}/, r = 'replace', prim = 'ui-priority-primary', sec = 'ui-priority-secondary', lic = 'elfinder-help-license', tab = '
  • {title}
  • ', html = ['
    ', '
      '], stpl = '
      {pattern}
      {descrip}
      ', sep = '
      ', selfUrl = $('base').length? fm.escape(document.location.href.replace(/#.*$/, '')) : '', clTabActive = fm.res('class', 'tabsactive'), getTheme = function() { var src; if (fm.theme && fm.theme.author) { src = atpl[r]('elfinder-help-team', 'elfinder-help-team elfinder-help-term-theme')[r](author, fm.i18n(fm.theme.author) + (fm.theme.email? ' <'+fm.theme.email+'>' : ''))[r](work, fm.i18n('theme') + ' ('+fm.i18n(fm.theme.name)+')'); } else { src = ''; } return src; }, about = function() { html.push('
      '); html.push('

      elFinder

      '); html.push('
      '+fm.i18n('webfm')+'
      '); html.push('
      '+fm.i18n('ver')+': '+fm.version+'
      '); html.push('
      '+fm.i18n('protocolver')+':
      '); html.push('
      jQuery/jQuery UI: '+$().jquery+'/'+$.ui.version+'
      '); html.push(sep); html.push(linktpltgt[r](url, 'https://studio-42.github.io/elFinder/')[r](link, fm.i18n('homepage'))); html.push(linktpltgt[r](url, 'https://github.com/Studio-42/elFinder/wiki')[r](link, fm.i18n('docs'))); html.push(linktpltgt[r](url, 'https://github.com/Studio-42/elFinder')[r](link, fm.i18n('github'))); //html.push(linktpltgt[r](url, 'http://twitter.com/elrte_elfinder')[r](link, fm.i18n('twitter'))); html.push(sep); html.push('
      '+fm.i18n('team')+'
      '); html.push(atpl[r](author, 'Dmitry "dio" Levashov <dio@std42.ru>')[r](work, fm.i18n('chiefdev'))); html.push(atpl[r](author, 'Naoki Sawada (nao-pon)<hypweb+elfinder@gmail.com>')[r](work, fm.i18n('developer'))); html.push(atpl[r](author, 'Troex Nevelin <troex@fury.scancode.ru>')[r](work, fm.i18n('maintainer'))); html.push(atpl[r](author, 'Alexey Sukhotin <strogg@yandex.ru>')[r](work, fm.i18n('contributor'))); if (fm.i18[fm.lang].translator) { $.each(fm.i18[fm.lang].translator.split(', '), function() { html.push(atpl[r](author, this.trim())[r](work, fm.i18n('translator')+' ('+fm.i18[fm.lang].language+')')); }); } html.push(getTheme()); html.push(sep); html.push('
      '+fm.i18n('icons')+': Pixelmixer, Fugue, Icons8
      '); html.push(sep); html.push('
      Licence: 3-clauses BSD Licence
      '); html.push('
      Copyright © 2009-2024, Studio 42 / nao-pon
      '); html.push('
      „ …'+fm.i18n('dontforget')+' ”
      '); html.push('
      '); }, shortcuts = function() { var sh = fm.shortcuts(); // shortcuts tab html.push('
      '); if (sh.length) { html.push('
      '); $.each(sh, function(i, s) { html.push(stpl.replace(/\{pattern\}/, s[0]).replace(/\{descrip\}/, s[1])); }); html.push('
      '); } else { html.push('
      '+fm.i18n('shortcutsof')+'
      '); } html.push('
      '); }, help = function() { // help tab html.push('
      '); html.push('DON\'T PANIC'); html.push('
      '); // end help }, useInteg = false, integrations = function() { useInteg = true; html.push('
      '); }, useDebug = false, debug = function() { useDebug = true; // debug tab html.push('
      '); html.push('
        '); html.push('
        '); // end debug }, debugRender = function() { var render = function(elm, obj) { $.each(obj, function(k, v) { elm.append($('
        ').text(k)); if (typeof v === 'undefined') { elm.append($('
        ').append($('').text('undfined'))); } else if (typeof v === 'object' && !v) { elm.append($('
        ').append($('').text('null'))); } else if (typeof v === 'object' && ($.isPlainObject(v) || v.length)) { elm.append( $('
        ').append(render($('
        '), v))); } else { elm.append($('
        ').append($('').text((v && typeof v === 'object')? '[]' : (v? v : '""')))); } }); return elm; }, cnt = debugUL.children('li').length, targetL, target, tabId, info, lastUL, lastDIV; if (self.debug.options || self.debug.debug) { if (cnt >= 5) { lastUL = debugUL.children('li:last'); lastDIV = debugDIV.children('div:last'); if (lastDIV.is(':hidden')) { lastUL.remove(); lastDIV.remove(); } else { lastUL.prev().remove(); lastDIV.prev().remove(); } } tabId = fm.namespace + '-help-debug-' + (+new Date()); targetL = $('
      • ').html(''+self.debug.debug.cmd+'').prependTo(debugUL); target = $('
        ').data('debug', self.debug); targetL.on('click.debugrender', function() { var debug = target.data('debug'); target.removeData('debug'); if (debug) { target.hide(); if (debug.debug) { info = $('
        ').append($('').text('debug'), render($('
        '), debug.debug)); target.append(info); } if (debug.options) { info = $('
        ').append($('').text('options'), render($('
        '), debug.options)); target.append(info); } target.show(); } targetL.off('click.debugrender'); }); debugUL.after(target); opened && debugDIV.tabs('refresh'); } }, content = '', opened, tabInteg, integDIV, tabDebug, debugDIV, debugUL; this.alwaysEnabled = true; this.updateOnSelect = false; this.state = -1; this.shortcuts = [{ pattern : 'f1', description : this.title }]; fm.bind('load', function() { var parts = self.options.view || ['about', 'shortcuts', 'help', 'integrations', 'debug'], i, helpSource, tabBase, tabNav, tabs, delta; // remove 'preference' tab, it moved to command 'preference' if ((i = $.inArray('preference', parts)) !== -1) { parts.splice(i, 1); } // debug tab require jQueryUI Tabs Widget if (! $.fn.tabs) { if ((i = $.inArray(parts, 'debug')) !== -1) { parts.splice(i, 1); } } $.each(parts, function(i, title) { html.push(tab[r](/\{id\}/g, title)[r](/\{title\}/, fm.i18n(title))); }); html.push('
      '); $.inArray('about', parts) !== -1 && about(); $.inArray('shortcuts', parts) !== -1 && shortcuts(); if ($.inArray('help', parts) !== -1) { helpSource = fm.i18nBaseUrl + 'help/%s.html.js'; help(); } $.inArray('integrations', parts) !== -1 && integrations(); $.inArray('debug', parts) !== -1 && debug(); html.push('
      '); content = $(html.join('')); content.find('.ui-tabs-nav li') .on('mouseenter mouseleave', function(e) { $(this).toggleClass('ui-state-hover', e.type === 'mouseenter'); }) .on('focus blur', 'a', function(e) { $(e.delegateTarget).toggleClass('ui-state-focus', e.type === 'focusin'); }) .children() .on('click', function(e) { var link = $(this); e.preventDefault(); e.stopPropagation(); link.parent().addClass(clTabActive).siblings().removeClass(clTabActive); content.children('.ui-tabs-panel').hide().filter(link.attr('href')).show(); }) .filter(':first').trigger('click'); if (useInteg) { tabInteg = content.find('.elfinder-help-tab-integrations').hide(); integDIV = content.find('#'+fm.namespace+'-help-integrations').hide().append($('
      ').html(fm.i18n('integrationWith'))); fm.bind('helpIntegration', function(e) { var ul = integDIV.children('ul:first'), data, elm, cmdUL, cmdCls; if (e.data) { if ($.isPlainObject(e.data)) { data = Object.assign({ link: '', title: '', banner: '' }, e.data); if (data.title || data.link) { if (!data.title) { data.title = data.link; } if (data.link) { elm = $('').attr('href', data.link).attr('target', '_blank').text(data.title); } else { elm = $('').text(data.title); } if (data.banner) { elm = $('').append($('').attr(data.banner), elm); } } } else { elm = $(e.data); elm.filter('a').each(function() { var tgt = $(this); if (!tgt.attr('target')) { tgt.attr('target', '_blank');; } }); } if (elm) { tabInteg.show(); if (!ul.length) { ul = $('
        ').appendTo(integDIV); } if (data && data.cmd) { cmdCls = 'elfinder-help-integration-' + data.cmd; cmdUL = ul.find('ul.' + cmdCls); if (!cmdUL.length) { cmdUL = $('
          '); ul.append($('
        • ').append($('').html(fm.i18n('cmd'+data.cmd))).append(cmdUL)); } elm = cmdUL.append($('
        • ').append(elm)); } else { ul.append($('
        • ').append(elm)); } } } }).bind('themechange', function() { content.find('div.elfinder-help-term-theme').replaceWith(getTheme()); }); } // debug if (useDebug) { tabDebug = content.find('.elfinder-help-tab-debug').hide(); debugDIV = content.find('#'+fm.namespace+'-help-debug').children('div:first'); debugUL = debugDIV.children('ul:first').on('click', function(e) { e.preventDefault(); e.stopPropagation(); }); self.debug = {}; fm.bind('backenddebug', function(e) { // CAUTION: DO NOT TOUCH `e.data` if (useDebug && e.data && e.data.debug) { self.debug = { options : e.data.options, debug : Object.assign({ cmd : fm.currentReqCmd }, e.data.debug) }; if (self.dialog) { debugRender(); } } }); } content.find('#'+fm.namespace+'-help-about').find('.apiver').text(fm.api); self.dialog = self.fmDialog(content, { title : self.title, width : 530, maxWidth: 'window', maxHeight: 'window', autoOpen : false, destroyOnClose : false, close : function() { if (useDebug) { tabDebug.hide(); debugDIV.tabs('destroy'); } opened = false; } }) .on('click', function(e) { e.stopPropagation(); }) .css({ overflow: 'hidden' }); tabBase = self.dialog.children('.ui-tabs'); tabNav = tabBase.children('.ui-tabs-nav:first'); tabs = tabBase.children('.ui-tabs-panel'); delta = self.dialog.outerHeight(true) - self.dialog.height(); self.dialog.closest('.ui-dialog').on('resize', function() { tabs.height(self.dialog.height() - delta - tabNav.outerHeight(true) - 20); }); if (helpSource) { self.dialog.one('initContents', function() { $.ajax({ url: self.options.helpSource? self.options.helpSource : helpSource.replace('%s', fm.lang), dataType: 'html' }).done(function(source) { $('#'+fm.namespace+'-help-help').html(source); }).fail(function() { $.ajax({ url: helpSource.replace('%s', 'en'), dataType: 'html' }).done(function(source) { $('#'+fm.namespace+'-help-help').html(source); }); }); }); } self.state = 0; fm.trigger('helpBuilded', self.dialog); }).one('open', function() { var debug = false; fm.one('backenddebug', function() { debug =true; }).one('opendone', function() { requestAnimationFrame(function() { if (! debug && useDebug) { useDebug = false; tabDebug.hide(); debugDIV.hide(); debugUL.hide(); } }); }); }); this.getstate = function() { return 0; }; this.exec = function(sel, opts) { var tab = opts? opts.tab : void(0), debugShow = function() { if (useDebug) { debugDIV.tabs(); debugUL.find('a:first').trigger('click'); tabDebug.show(); opened = true; } }; debugShow(); this.dialog.trigger('initContents').elfinderdialog('open').find((tab? '.elfinder-help-tab-'+tab : '.ui-tabs-nav li') + ' a:first').trigger('click'); return $.Deferred().resolve(); }; }).prototype = { forceLoad : true }; // this is required command /* * File: /js/commands/hidden.js */ /** * @class elFinder command "hidden" * Always hidden command for uiCmdMap * * @author Naoki Sawada **/ elFinder.prototype.commands.hidden = function() { this.hidden = true; this.updateOnSelect = false; this.getstate = function() { return -1; }; }; /* * File: /js/commands/hide.js */ /** * @class elFinder command "hide". * folders/files to hide as personal setting. * * @type elFinder.command * @author Naoki Sawada */ elFinder.prototype.commands.hide = function() { var self = this, nameCache = {}, hideData, hideCnt, cMenuType, sOrigin; this.syncTitleOnChange = true; this.shortcuts = [{ pattern : 'ctrl+shift+dot', description : this.fm.i18n('toggleHidden') }]; this.init = function() { var fm = this.fm; hideData = fm.storage('hide') || {items: {}}; hideCnt = Object.keys(hideData.items).length; this.title = fm.i18n(hideData.show? 'hideHidden' : 'showHidden'); self.update(void(0), self.title); }; this.fm.bind('select contextmenucreate closecontextmenu', function(e, fm) { var sel = (e.data? (e.data.selected || e.data.targets) : null) || fm.selected(); if (e.type === 'select' && e.data) { sOrigin = e.data.origin; } else if (e.type === 'contextmenucreate') { cMenuType = e.data.type; } if (!sel.length || (((e.type !== 'contextmenucreate' && sOrigin !== 'navbar') || cMenuType === 'cwd') && sel[0] === fm.cwd().hash)) { self.title = fm.i18n(hideData.show? 'hideHidden' : 'showHidden'); } else { self.title = fm.i18n('cmdhide'); } if (e.type !== 'closecontextmenu') { self.update(cMenuType === 'cwd'? (hideCnt? 0 : -1) : void(0), self.title); } else { cMenuType = ''; requestAnimationFrame(function() { self.update(void(0), self.title); }); } }); this.getstate = function(sel) { return (this.fm.cookieEnabled && cMenuType !== 'cwd' && (sel || this.fm.selected()).length) || hideCnt? 0 : -1; }; this.exec = function(hashes, opts) { var fm = this.fm, dfrd = $.Deferred() .done(function() { fm.trigger('hide', {items: items, opts: opts}); }) .fail(function(error) { fm.error(error); }), o = opts || {}, items = o.targets? o.targets : (hashes || fm.selected()), added = [], removed = [], notifyto, files, res; hideData = fm.storage('hide') || {}; if (!$.isPlainObject(hideData)) { hideData = {}; } if (!$.isPlainObject(hideData.items)) { hideData.items = {}; } if (opts._currentType === 'shortcut' || !items.length || (opts._currentType !== 'navbar' && sOrigin !=='navbar' && items[0] === fm.cwd().hash)) { if (hideData.show) { o.hide = true; } else if (Object.keys(hideData.items).length) { o.show = true; } } if (o.reset) { o.show = true; hideCnt = 0; } if (o.show || o.hide) { if (o.show) { hideData.show = true; } else { delete hideData.show; } if (o.show) { fm.storage('hide', o.reset? null : hideData); self.title = fm.i18n('hideHidden'); self.update(o.reset? -1 : void(0), self.title); $.each(hideData.items, function(h) { var f = fm.file(h, true); if (f && (fm.searchStatus.state || !f.phash || fm.file(f.phash))) { added.push(f); } }); if (added.length) { fm.updateCache({added: added}); fm.add({added: added}); } if (o.reset) { hideData = {items: {}}; } return dfrd.resolve(); } items = Object.keys(hideData.items); } if (items.length) { $.each(items, function(i, h) { var f; if (!hideData.items[h]) { f = fm.file(h); if (f) { nameCache[h] = f.i18 || f.name; } hideData.items[h] = nameCache[h]? nameCache[h] : h; } }); hideCnt = Object.keys(hideData.items).length; files = this.files(items); fm.storage('hide', hideData); fm.remove({removed: items}); if (hideData.show) { this.exec(void(0), {hide: true}); } if (!o.hide) { res = {}; res.undo = { cmd : 'hide', callback : function() { var nData = fm.storage('hide'); if (nData) { $.each(items, function(i, h) { delete nData.items[h]; }); hideCnt = Object.keys(nData.items).length; fm.storage('hide', nData); fm.trigger('hide', {items: items, opts: {}}); self.update(hideCnt? 0 : -1); } fm.updateCache({added: files}); fm.add({added: files}); } }; res.redo = { cmd : 'hide', callback : function() { return fm.exec('hide', void(0), {targets: items}); } }; } } return dfrd.state() == 'rejected' ? dfrd : dfrd.resolve(res); }; }; /* * File: /js/commands/home.js */ (elFinder.prototype.commands.home = function() { this.title = 'Home'; this.alwaysEnabled = true; this.updateOnSelect = false; this.shortcuts = [{ pattern : 'ctrl+home ctrl+shift+up', description : 'Home' }]; this.getstate = function() { var root = this.fm.root(), cwd = this.fm.cwd().hash; return root && cwd && root != cwd ? 0: -1; }; this.exec = function() { return this.fm.exec('open', this.fm.root()); }; }).prototype = { forceLoad : true }; // this is required command /* * File: /js/commands/info.js */ /** * @class elFinder command "info". * Display dialog with file properties. * * @author Dmitry (dio) Levashov, dio@std42.ru **/ (elFinder.prototype.commands.info = function() { var m = 'msg', fm = this.fm, spclass = 'elfinder-spinner', btnclass = 'elfinder-info-button', msg = { calc : fm.i18n('calc'), size : fm.i18n('size'), unknown : fm.i18n('unknown'), path : fm.i18n('path'), aliasfor : fm.i18n('aliasfor'), modify : fm.i18n('modify'), perms : fm.i18n('perms'), locked : fm.i18n('locked'), dim : fm.i18n('dim'), kind : fm.i18n('kind'), files : fm.i18n('files'), folders : fm.i18n('folders'), roots : fm.i18n('volumeRoots'), items : fm.i18n('items'), yes : fm.i18n('yes'), no : fm.i18n('no'), link : fm.i18n('link'), owner : fm.i18n('owner'), group : fm.i18n('group'), perm : fm.i18n('perm'), getlink : fm.i18n('getLink') }, applyZWSP = function(str, remove) { if (remove) { return str.replace(/\u200B/g, ''); } else { return str.replace(/(\/|\\)/g, "$1\u200B"); } }; this.items = ['size', 'aliasfor', 'path', 'link', 'dim', 'modify', 'perms', 'locked', 'owner', 'group', 'perm']; if (this.options.custom && Object.keys(this.options.custom).length) { $.each(this.options.custom, function(name, details) { details.label && this.items.push(details.label); }); } this.tpl = { main : '
          {title}
          {content}
          ', itemTitle : '{name}{kind}', groupTitle : '{items}: {num}', row : '{label} : {value}', spinner : '{text} ' }; this.alwaysEnabled = true; this.updateOnSelect = false; this.shortcuts = [{ pattern : 'ctrl+i' }]; this.init = function() { $.each(msg, function(k, v) { msg[k] = fm.i18n(v); }); }; this.getstate = function() { return 0; }; this.exec = function(hashes) { var files = this.files(hashes); if (! files.length) { files = this.files([ this.fm.cwd().hash ]); } var self = this, fm = this.fm, o = this.options, tpl = this.tpl, row = tpl.row, cnt = files.length, content = [], view = tpl.main, l = '{label}', v = '{value}', reqs = [], reqDfrd = null, opts = { title : fm.i18n('selectionInfo'), width : 'auto', close : function() { $(this).elfinderdialog('destroy'); if (reqDfrd && reqDfrd.state() === 'pending') { reqDfrd.reject(); } $.grep(reqs, function(r) { r && r.state() === 'pending' && r.reject(); }); } }, count = [], replSpinner = function(msg, name, className) { dialog.find('.'+spclass+'-'+name).parent().html(msg).addClass(className || ''); }, id = fm.namespace+'-info-'+$.map(files, function(f) { return f.hash; }).join('-'), dialog = fm.getUI().find('#'+id), customActions = [], style = '', hashClass = 'elfinder-font-mono elfinder-info-hash', getHashAlgorisms = [], ndialog = fm.ui.notify, size, tmb, file, title, dcnt, rdcnt, path, hideItems, hashProg; if (ndialog.is(':hidden') && ndialog.children('.elfinder-notify').length) { ndialog.elfinderdialog('open').height('auto'); } if (!cnt) { return $.Deferred().reject(); } if (dialog.length) { dialog.elfinderdialog('toTop'); return $.Deferred().resolve(); } hideItems = fm.storage('infohides') || fm.arrayFlip(o.hideItems, true); if (cnt === 1) { file = files[0]; if (file.icon) { style = ' '+fm.getIconStyle(file); } view = view.replace('{dirclass}', file.csscls? fm.escape(file.csscls) : '').replace('{class}', fm.mime2class(file.mime)).replace('{style}', style); title = tpl.itemTitle.replace('{name}', fm.escape(file.i18 || file.name)).replace('{kind}', ''+fm.mime2kind(file)+''); tmb = fm.tmb(file); if (!file.read) { size = msg.unknown; } else if (file.mime != 'directory' || file.alias) { size = fm.formatSize(file.size); } else { size = tpl.spinner.replace('{text}', msg.calc).replace('{name}', 'size'); count.push(file.hash); } !hideItems.size && content.push(row.replace(l, msg.size).replace(v, size)); !hideItems.aleasfor && file.alias && content.push(row.replace(l, msg.aliasfor).replace(v, file.alias)); if (!hideItems.path) { if (path = fm.path(file.hash, true)) { content.push(row.replace(l, msg.path).replace(v, applyZWSP(fm.escape(path))).replace('{class}', 'elfinder-info-path')); } else { content.push(row.replace(l, msg.path).replace(v, tpl.spinner.replace('{text}', msg.calc).replace('{name}', 'path')).replace('{class}', 'elfinder-info-path')); reqs.push(fm.path(file.hash, true, {notify: null}) .fail(function() { replSpinner(msg.unknown, 'path'); }) .done(function(path) { replSpinner(applyZWSP(path), 'path'); })); } } if (!hideItems.link && file.read) { var href, name_esc = fm.escape(file.name); if (file.url == '1') { content.push(row.replace(l, msg.link).replace(v, '')); } else { if (file.url) { href = file.url; } else if (file.mime === 'directory') { if (o.nullUrlDirLinkSelf && file.url === null) { var loc = window.location; href = loc.pathname + loc.search + '#elf_' + file.hash; } else if (file.url !== '' && fm.option('url', (!fm.isRoot(file) && file.phash) || file.hash)) { href = fm.url(file.hash); } } else { href = fm.url(file.hash); } href && content.push(row.replace(l, msg.link).replace(v, ''+name_esc+'')); } } if (!hideItems.dim) { if (file.dim) { // old api content.push(row.replace(l, msg.dim).replace(v, file.dim)); } else if (file.mime.indexOf('image') !== -1) { if (file.width && file.height) { content.push(row.replace(l, msg.dim).replace(v, file.width+'x'+file.height)); } else if (file.size && file.size !== '0') { content.push(row.replace(l, msg.dim).replace(v, tpl.spinner.replace('{text}', msg.calc).replace('{name}', 'dim'))); reqs.push(fm.request({ data : {cmd : 'dim', target : file.hash}, preventDefault : true }) .fail(function() { replSpinner(msg.unknown, 'dim'); }) .done(function(data) { replSpinner(data.dim || msg.unknown, 'dim'); if (data.dim) { var dim = data.dim.split('x'); var rfile = fm.file(file.hash); rfile.width = dim[0]; rfile.height = dim[1]; } })); } } } !hideItems.modify && content.push(row.replace(l, msg.modify).replace(v, fm.formatDate(file))); !hideItems.perms && content.push(row.replace(l, msg.perms).replace(v, fm.formatPermissions(file))); !hideItems.locked && content.push(row.replace(l, msg.locked).replace(v, file.locked ? msg.yes : msg.no)); !hideItems.owner && file.owner && content.push(row.replace(l, msg.owner).replace(v, file.owner)); !hideItems.group && file.group && content.push(row.replace(l, msg.group).replace(v, file.group)); !hideItems.perm && file.perm && content.push(row.replace(l, msg.perm).replace(v, fm.formatFileMode(file.perm))); // Get MD5, SHA hashes if (window.ArrayBuffer && (fm.options.cdns.sparkmd5 || fm.options.cdns.jssha) && file.mime !== 'directory' && file.size > 0 && (!o.showHashMaxsize || file.size <= o.showHashMaxsize)) { getHashAlgorisms = []; $.each(fm.storage('hashchekcer') || o.showHashAlgorisms, function(i, n) { if (!file[n]) { content.push(row.replace(l, fm.i18n(n)).replace(v, tpl.spinner.replace('{text}', msg.calc).replace('{name}', n))); getHashAlgorisms.push(n); } else { content.push(row.replace(l, fm.i18n(n)).replace(v, file[n]).replace('{class}', hashClass)); } }); if (getHashAlgorisms.length) { hashProg = $('
          '); reqs.push( fm.getContentsHashes(file.hash, getHashAlgorisms, o.showHashOpts, { progressBar : hashProg }).progress(function(hashes) { $.each(getHashAlgorisms, function(i, n) { if (hashes[n]) { replSpinner(hashes[n], n, hashClass); } }); }).always(function() { $.each(getHashAlgorisms, function(i, n) { replSpinner(msg.unknown, n); }); }) ); } } // Add custom info fields if (o.custom) { $.each(o.custom, function(name, details) { if ( !hideItems[details.label] && (!details.mimes || $.grep(details.mimes, function(m){return (file.mime === m || file.mime.indexOf(m+'/') === 0)? true : false;}).length) && (!details.hashRegex || file.hash.match(details.hashRegex)) ) { // Add to the content content.push(row.replace(l, fm.i18n(details.label)).replace(v , details.tpl.replace('{id}', id))); // Register the action if (details.action && (typeof details.action == 'function')) { customActions.push(details.action); } } }); } } else { view = view.replace('{class}', 'elfinder-cwd-icon-group'); title = tpl.groupTitle.replace('{items}', msg.items).replace('{num}', cnt); dcnt = $.grep(files, function(f) { return f.mime == 'directory' ? true : false ; }).length; if (!dcnt) { size = 0; $.each(files, function(h, f) { var s = parseInt(f.size); if (s >= 0 && size >= 0) { size += s; } else { size = 'unknown'; } }); content.push(row.replace(l, msg.kind).replace(v, msg.files)); !hideItems.size && content.push(row.replace(l, msg.size).replace(v, fm.formatSize(size))); } else { rdcnt = $.grep(files, function(f) { return f.mime === 'directory' && (! f.phash || f.isroot)? true : false ; }).length; dcnt -= rdcnt; content.push(row.replace(l, msg.kind).replace(v, (rdcnt === cnt || dcnt === cnt)? msg[rdcnt? 'roots' : 'folders'] : $.map({roots: rdcnt, folders: dcnt, files: cnt - rdcnt - dcnt}, function(c, t) { return c? msg[t]+' '+c : null; }).join(', '))); !hideItems.size && content.push(row.replace(l, msg.size).replace(v, tpl.spinner.replace('{text}', msg.calc).replace('{name}', 'size'))); count = $.map(files, function(f) { return f.hash; }); } } view = view.replace('{title}', title).replace('{content}', content.join('').replace(/{class}/g, '')); dialog = self.fmDialog(view, opts); dialog.attr('id', id).one('mousedown', '.elfinder-info-path', function() { $(this).html(applyZWSP($(this).html(), true)); }); if (getHashAlgorisms.length) { hashProg.appendTo(dialog.find('.'+spclass+'-'+getHashAlgorisms[0]).parent()); } if (fm.UA.Mobile && $.fn.tooltip) { dialog.children('.ui-dialog-content .elfinder-info-title').tooltip({ classes: { 'ui-tooltip': 'elfinder-ui-tooltip ui-widget-shadow' }, tooltipClass: 'elfinder-ui-tooltip ui-widget-shadow', track: true }); } if (file && file.url == '1') { dialog.on('click', '.'+spclass+'-url', function(){ $(this).parent().html(tpl.spinner.replace('{text}', fm.i18n('ntfurl')).replace('{name}', 'url')); fm.request({ data : {cmd : 'url', target : file.hash}, preventDefault : true }) .fail(function() { replSpinner(name_esc, 'url'); }) .done(function(data) { if (data.url) { replSpinner(''+name_esc+'' || name_esc, 'url'); var rfile = fm.file(file.hash); rfile.url = data.url; } else { replSpinner(name_esc, 'url'); } }); }); } // load thumbnail if (tmb) { $('') .on('load', function() { dialog.find('.elfinder-cwd-icon').addClass(tmb.className).css('background-image', "url('"+tmb.url+"')"); }) .attr('src', tmb.url); } // send request to count total size if (count.length) { reqDfrd = fm.getSize(count).done(function(data) { replSpinner(data.formated, 'size'); }).fail(function() { replSpinner(msg.unknown, 'size'); }); } // call custom actions if (customActions.length) { $.each(customActions, function(i, action) { try { action(file, fm, dialog); } catch(e) { fm.debug('error', e); } }); } return $.Deferred().resolve(); }; }).prototype = { forceLoad : true }; // this is required command /* * File: /js/commands/mkdir.js */ /** * @class elFinder command "mkdir" * Create new folder * * @author Dmitry (dio) Levashov **/ elFinder.prototype.commands.mkdir = function() { var fm = this.fm, self = this, curOrg; this.value = ''; this.disableOnSearch = true; this.updateOnSelect = false; this.syncTitleOnChange = true; this.mime = 'directory'; this.prefix = 'untitled folder'; this.exec = function(select, cOpts) { var onCwd; if (select && select.length && cOpts && cOpts._currentType && cOpts._currentType === 'navbar') { this.origin = cOpts._currentType; this.data = { target: select[0] }; } else { onCwd = fm.cwd().hash === select[0]; this.origin = curOrg && !onCwd? curOrg : 'cwd'; delete this.data; } if (! select && ! this.options.intoNewFolderToolbtn) { fm.getUI('cwd').trigger('unselectall'); } //this.move = (!onCwd && curOrg !== 'navbar' && fm.selected().length)? true : false; this.move = this.value === fm.i18n('cmdmkdirin'); return fm.res('mixin', 'make').bind(self)(); }; this.shortcuts = [{ pattern : 'ctrl+shift+n' }]; this.init = function() { if (this.options.intoNewFolderToolbtn) { this.syncTitleOnChange = true; } }; fm.bind('select contextmenucreate closecontextmenu', function(e) { var sel = (e.data? (e.data.selected || e.data.targets) : null) || fm.selected(); self.className = 'mkdir'; curOrg = e.data && sel.length? (e.data.origin || e.data.type || '') : ''; if (!self.options.intoNewFolderToolbtn && curOrg === '') { curOrg = 'cwd'; } if (sel.length && curOrg !== 'navbar' && curOrg !== 'cwd' && fm.cwd().hash !== sel[0]) { self.title = fm.i18n('cmdmkdirin'); self.className += ' elfinder-button-icon-mkdirin'; } else { self.title = fm.i18n('cmdmkdir'); } if (e.type !== 'closecontextmenu') { self.update(void(0), self.title); } else { requestAnimationFrame(function() { self.update(void(0), self.title); }); } }); this.getstate = function(select) { var cwd = fm.cwd(), sel = (curOrg === 'navbar' || (select && select[0] !== cwd.hash))? this.files(select || fm.selected()) : [], cnt = sel.length, filter = function(files) { var fres = true; return $.grep(files, function(f) { fres = fres && f.read && ! f.locked? true : false; return fres; }); }; if (curOrg === 'navbar') { return cnt && sel[0].write && sel[0].read? 0 : -1; } else { return cwd.write && (!cnt || filter(sel).length == cnt)? 0 : -1; } }; }; /* * File: /js/commands/mkfile.js */ /** * @class elFinder command "mkfile" * Create new empty file * * @author Dmitry (dio) Levashov **/ elFinder.prototype.commands.mkfile = function() { var self = this; this.disableOnSearch = true; this.updateOnSelect = false; this.mime = 'text/plain'; this.prefix = 'untitled file.txt'; this.variants = []; this.getTypeName = function(mime, type) { var fm = self.fm, name; if (name = fm.messages['kind' + fm.kinds[mime]]) { name = fm.i18n(['extentiontype', type.toUpperCase(), name]); } else { name = fm.i18n(['extentionfile', type.toUpperCase()]); } return name; }; this.fm.bind('open reload canMakeEmptyFile', function() { var fm = self.fm, hides = fm.getCommand('edit').getMkfileHides(); self.variants = []; if (fm.mimesCanMakeEmpty) { $.each(fm.mimesCanMakeEmpty, function(mime, type) { type && !hides[mime] && fm.uploadMimeCheck(mime) && self.variants.push([mime, self.getTypeName(mime, type)]); }); } self.change(); }); this.getstate = function() { return this.fm.cwd().write ? 0 : -1; }; this.exec = function(_dum, mime) { var fm = self.fm, type, err; if (type = fm.mimesCanMakeEmpty[mime]) { if (fm.uploadMimeCheck(mime)) { this.mime = mime; this.prefix = fm.i18n(['untitled file', type]); return fm.res('mixin', 'make').bind(self)(); } err = ['errMkfile', self.getTypeName(mime, type)]; } return $.Deferred().reject(err); }; }; /* * File: /js/commands/netmount.js */ /** * @class elFinder command "netmount" * Mount network volume with user credentials. * * @author Dmitry (dio) Levashov **/ elFinder.prototype.commands.netmount = function() { var self = this, hasMenus = false, content; this.alwaysEnabled = true; this.updateOnSelect = false; this.drivers = []; this.handlers = { load : function() { var fm = self.fm; if (fm.cookieEnabled) { fm.one('open', function() { self.drivers = fm.netDrivers; if (self.drivers.length) { $.each(self.drivers, function() { var d = self.options[this]; if (d) { hasMenus = true; if (d.integrateInfo) { fm.trigger('helpIntegration', Object.assign({cmd: 'netmount'}, d.integrateInfo)); } } }); } }); } } }; this.getstate = function() { return hasMenus ? 0 : -1; }; this.exec = function() { var fm = self.fm, dfrd = $.Deferred(), o = self.options, create = function() { var winFocus = function() { inputs.protocol.trigger('change', 'winfocus'); }, inputs = { protocol : $('') .on('change', function(e, data){ var protocol = this.value; content.find('.elfinder-netmount-tr').hide(); content.find('.elfinder-netmount-tr-'+protocol).show(); dialogNode && dialogNode.children('.ui-dialog-buttonpane:first').find('button').show(); if (typeof o[protocol].select == 'function') { o[protocol].select(fm, e, data); } }) .addClass('ui-corner-all') }, opts = { title : fm.i18n('netMountDialogTitle'), resizable : true, modal : true, destroyOnClose : false, open : function() { $(window).on('focus.'+fm.namespace, winFocus); inputs.protocol.trigger('change'); }, close : function() { dfrd.state() == 'pending' && dfrd.reject(); $(window).off('focus.'+fm.namespace, winFocus); }, buttons : {} }, doMount = function() { var protocol = inputs.protocol.val(), data = {cmd : 'netmount', protocol: protocol}, cur = o[protocol], mnt2res; $.each(content.find('input.elfinder-netmount-inputs-'+protocol), function(name, input) { var val, elm; elm = $(input); if (elm.is(':radio,:checkbox')) { if (elm.is(':checked')) { val = elm.val().trim(); } } else { val = elm.val().trim(); } if (val) { data[input.name] = val; } }); if (!data.host) { return fm.trigger('error', {error : 'errNetMountHostReq', opts : {modal: true}}); } if (data.mnt2res) { mnt2res = true; } fm.request({data : data, notify : {type : 'netmount', cnt : 1, hideCnt : true}}) .done(function(data) { var pdir; if (data.added && data.added.length) { mnt2res && inputs.protocol.trigger('change', 'reset'); if (data.added[0].phash) { if (pdir = fm.file(data.added[0].phash)) { if (! pdir.dirs) { pdir.dirs = 1; fm.change({ changed: [ pdir ] }); } } } fm.one('netmountdone', function() { fm.exec('open', data.added[0].hash); }); } dfrd.resolve(); }) .fail(function(error) { if (cur.fail && typeof cur.fail == 'function') { cur.fail(fm, fm.parseError(error)); } dfrd.reject(error); }); self.dialog.elfinderdialog('close'); }, form = $('
          ').on('keydown', 'input', function(e) { var comp = true, next; if (e.keyCode === $.ui.keyCode.ENTER) { $.each(form.find('input:visible:not(.elfinder-input-optional)'), function() { if ($(this).val() === '') { comp = false; next = $(this); return false; } }); if (comp) { doMount(); } else { next.trigger('focus'); } } }), hidden = $('
          '), dialog; content = $('
          ') .append($('').append($(''+fm.i18n('protocol')+'')).append($('').append(inputs.protocol))); $.each(self.drivers, function(i, protocol) { if (o[protocol]) { inputs.protocol.append(''); $.each(o[protocol].inputs, function(name, input) { input.attr('name', name); if (input.attr('type') != 'hidden') { input.addClass('ui-corner-all elfinder-netmount-inputs-'+protocol); content.append($('').addClass('elfinder-netmount-tr elfinder-netmount-tr-'+protocol).append($(''+fm.i18n(name)+'')).append($('').append(input))); } else { input.addClass('elfinder-netmount-inputs-'+protocol); hidden.append(input); } }); o[protocol].protocol = inputs.protocol; } }); content.append(hidden); content.find('.elfinder-netmount-tr').hide(); content.find('.elfinder-netmount-tr-' + self.drivers[0]).show(); opts.buttons[fm.i18n('btnMount')] = doMount; opts.buttons[fm.i18n('btnCancel')] = function() { self.dialog.elfinderdialog('close'); }; content.find('select,input').addClass('elfinder-tabstop'); dialog = self.fmDialog(form.append(content), opts).ready(function() { inputs.protocol.trigger('change'); dialog.elfinderdialog('posInit'); }); dialogNode = dialog.closest('.ui-dialog'); return dialog; }, dialogNode; if (!self.dialog) { self.dialog = create(); } else { self.dialog.elfinderdialog('open'); } return dfrd.promise(); }; self.fm.bind('netmount', function(e) { var d = e.data || null, o = self.options, done = function() { if (o[d.protocol] && typeof o[d.protocol].done == 'function') { o[d.protocol].done(self.fm, d); content.find('select,input').addClass('elfinder-tabstop'); self.dialog.elfinderdialog('tabstopsInit'); } }; if (d && d.protocol) { if (d.mode && d.mode === 'redirect') { // To support of third-party cookie blocking (ITP) on CORS // On iOS and iPadOS 13.4 and Safari 13.1 on macOS, the session cannot be continued when redirecting OAuth in CORS mode self.fm.request({ data : {cmd : 'netmount', protocol : d.protocol, host: d.host, user : 'init', pass : 'return', options: d.options}, preventDefault : true }).done(function(data) { d = JSON.parse(data.body); done(); }); } else { done(); } } }); }; elFinder.prototype.commands.netunmount = function() { var self = this; this.alwaysEnabled = true; this.updateOnSelect = false; this.drivers = []; this.handlers = { load : function() { this.drivers = this.fm.netDrivers; } }; this.getstate = function(sel) { var fm = this.fm, file; return !!sel && this.drivers.length && !this._disabled && (file = fm.file(sel[0])) && file.netkey ? 0 : -1; }; this.exec = function(hashes) { var self = this, fm = this.fm, dfrd = $.Deferred() .fail(function(error) { error && fm.error(error); }), drive = fm.file(hashes[0]), childrenRoots = function(hash) { var roots = [], work; if (fm.leafRoots) { work = []; $.each(fm.leafRoots, function(phash, hashes) { var parents = fm.parents(phash), idx, deep; if ((idx = $.inArray(hash, parents)) !== -1) { idx = parents.length - idx; $.each(hashes, function(i, h) { work.push({i: idx, hash: h}); }); } }); if (work.length) { work.sort(function(a, b) { return a.i < b.i; }); $.each(work, function(i, o) { roots.push(o.hash); }); } } return roots; }; if (this._disabled) { return dfrd.reject(); } if (dfrd.state() == 'pending') { fm.confirm({ title : self.title, text : fm.i18n('confirmUnmount', drive.name), accept : { label : 'btnUnmount', callback : function() { var target = drive.hash, roots = childrenRoots(target), requests = [], removed = [], doUmount = function() { $.when(requests).done(function() { fm.request({ data : {cmd : 'netmount', protocol : 'netunmount', host: drive.netkey, user : target, pass : 'dum'}, notify : {type : 'netunmount', cnt : 1, hideCnt : true}, preventFail : true }) .fail(function(error) { dfrd.reject(error); }) .done(function(data) { drive.volumeid && delete fm.volumeExpires[drive.volumeid]; dfrd.resolve(); }); }).fail(function(error) { if (removed.length) { fm.remove({ removed: removed }); } dfrd.reject(error); }); }; if (roots.length) { fm.confirm({ title : self.title, text : (function() { var msgs = ['unmountChildren']; $.each(roots, function(i, hash) { msgs.push([fm.file(hash).name]); }); return msgs; })(), accept : { label : 'btnUnmount', callback : function() { $.each(roots, function(i, hash) { var d = fm.file(hash); if (d.netkey) { requests.push(fm.request({ data : {cmd : 'netmount', protocol : 'netunmount', host: d.netkey, user : d.hash, pass : 'dum'}, notify : {type : 'netunmount', cnt : 1, hideCnt : true}, preventDefault : true }).done(function(data) { if (data.removed) { d.volumeid && delete fm.volumeExpires[d.volumeid]; removed = removed.concat(data.removed); } })); } }); doUmount(); } }, cancel : { label : 'btnCancel', callback : function() { dfrd.reject(); } } }); } else { requests = null; doUmount(); } } }, cancel : { label : 'btnCancel', callback : function() { dfrd.reject(); } } }); } return dfrd; }; }; /* * File: /js/commands/open.js */ /** * @class elFinder command "open" * Enter folder or open files in new windows * * @author Dmitry (dio) Levashov **/ (elFinder.prototype.commands.open = function() { var fm = this.fm, self = this; this.alwaysEnabled = true; this.noChangeDirOnRemovedCwd = true; this._handlers = { dblclick : function(e) { var arg = e.data && e.data.file? [ e.data.file ]: void(0); if (self.getstate(arg) === 0) { e.preventDefault(); fm.exec('open', arg); } }, 'select enable disable reload' : function(e) { this.update(e.type == 'disable' ? -1 : void(0)); } }; this.shortcuts = [{ pattern : 'ctrl+down numpad_enter'+(fm.OS != 'mac' && ' enter') }]; this.getstate = function(select) { var sel = this.files(select), cnt = sel.length, filter = function(files) { var fres = true; return $.grep(files, function(file) { fres = fres && file.mime == 'directory' || ! file.read ? false : true; return fres; }); }; return cnt == 1 ? (sel[0].read ? 0 : -1) : (cnt && !fm.UA.Mobile) ? ($.grep(sel, function(file) { return file.mime == 'directory' || ! file.read ? false : true;}).length == cnt ? 0 : -1) : -1; }; this.exec = function(hashes, cOpts) { var dfrd = $.Deferred().fail(function(error) { error && fm.error(error); }), files = this.files(hashes), cnt = files.length, thash = (typeof cOpts == 'object')? cOpts.thash : false, opts = this.options, into = opts.into || 'window', file, url, s, w, imgW, imgH, winW, winH, reg, link, html5dl, inline, selAct, cmd; if (!cnt && !thash) { { return dfrd.reject(); } } // open folder if (thash || (cnt == 1 && (file = files[0]) && file.mime == 'directory')) { if (!thash && file && !file.read) { return dfrd.reject(['errOpen', file.name, 'errPerm']); } else { if (fm.keyState.ctrlKey && (fm.keyState.shiftKey || typeof fm.options.getFileCallback !== 'function')) { if (fm.getCommand('opennew')) { return fm.exec('opennew', [thash? thash : file.hash]); } } return fm.request({ data : {cmd : 'open', target : thash || file.hash}, notify : {type : 'open', cnt : 1, hideCnt : true}, syncOnFail : true, lazy : false }); } } files = $.grep(files, function(file) { return file.mime != 'directory' ? true : false; }); // nothing to open or files and folders selected - do nothing if (cnt != files.length) { return dfrd.reject(); } var doOpen = function() { var openCB = function(url) { var link = $('').hide().appendTo($('body')); if (fm.UA.Mobile || !inline) { if (html5dl) { if (!inline) { link.attr('download', file.name); } else { link.attr('target', '_blank'); } link.attr('href', url).get(0).click(); } else { wnd = window.open(url); if (!wnd) { return dfrd.reject('errPopup'); } } } else { getOnly = (typeof opts.method === 'string' && opts.method.toLowerCase() === 'get'); if (!getOnly && url.indexOf(fm.options.url) === 0 && fm.customData && Object.keys(fm.customData).length // Since playback by POST request can not be done in Chrome, media allows GET request && !file.mime.match(/^(?:video|audio)/) ) { // Send request as 'POST' method to hide custom data at location bar url = ''; } if (into === 'window') { // set window size for image if set imgW = winW = Math.round(2 * screen.availWidth / 3); imgH = winH = Math.round(2 * screen.availHeight / 3); if (parseInt(file.width) && parseInt(file.height)) { imgW = parseInt(file.width); imgH = parseInt(file.height); } else if (file.dim) { s = file.dim.split('x'); imgW = parseInt(s[0]); imgH = parseInt(s[1]); } if (winW >= imgW && winH >= imgH) { winW = imgW; winH = imgH; } else { if ((imgW - winW) > (imgH - winH)) { winH = Math.round(imgH * (winW / imgW)); } else { winW = Math.round(imgW * (winH / imgH)); } } w = 'width='+winW+',height='+winH; wnd = window.open(url, target, w + ',top=50,left=50,scrollbars=yes,resizable=yes,titlebar=no'); } else { if (into === 'tabs') { target = file.hash; } wnd = window.open('about:blank', target); } if (!wnd) { return dfrd.reject('errPopup'); } if (url === '') { var form = document.createElement("form"); form.action = fm.options.url; form.method = 'POST'; form.target = target; form.style.display = 'none'; var params = Object.assign({}, fm.customData, { cmd: 'file', target: file.hash, _t: file.ts || parseInt(+new Date()/1000) }); $.each(params, function(key, val) { var input = document.createElement("input"); input.name = key; input.value = val; form.appendChild(input); }); document.body.appendChild(form); form.submit(); } else if (into !== 'window') { wnd.location = url; } $(wnd).trigger('focus'); } link.remove(); }, wnd, target, getOnly; try { reg = new RegExp(fm.option('dispInlineRegex'), 'i'); } catch(e) { reg = false; } // open files html5dl = (typeof $('').get(0).download === 'string'); cnt = files.length; while (cnt--) { target = 'elf_open_window'; file = files[cnt]; if (!file.read) { return dfrd.reject(['errOpen', file.name, 'errPerm']); } inline = (reg && file.mime.match(reg)); fm.openUrl(file.hash, !inline, openCB); } return dfrd.resolve(hashes); }; if (cnt > 1) { fm.confirm({ title: 'openMulti', text : ['openMultiConfirm', cnt + ''], accept : { label : 'cmdopen', callback : function() { doOpen(); } }, cancel : { label : 'btnCancel', callback : function() { dfrd.reject(); } }, buttons : (fm.getCommand('zipdl') && fm.isCommandEnabled('zipdl', fm.cwd().hash))? [ { label : 'cmddownload', callback : function() { fm.exec('download', hashes); dfrd.reject(); } } ] : [] }); } else { selAct = fm.storage('selectAction') || opts.selectAction; if (selAct) { $.each(selAct.split('/'), function() { var cmdName = this.valueOf(); if (cmdName !== 'open' && (cmd = fm.getCommand(cmdName)) && cmd.enabled()) { return false; } cmd = null; }); if (cmd) { return fm.exec(cmd.name); } } doOpen(); } return dfrd; }; }).prototype = { forceLoad : true }; // this is required command /* * File: /js/commands/opendir.js */ /** * @class elFinder command "opendir" * Enter parent folder * * @author Naoki Sawada **/ elFinder.prototype.commands.opendir = function() { this.alwaysEnabled = true; this.getstate = function() { var sel = this.fm.selected(), cnt = sel.length, wz; if (cnt !== 1) { return -1; } wz = this.fm.getUI('workzone'); return wz.hasClass('elfinder-search-result')? 0 : -1; }; this.exec = function(hashes) { var fm = this.fm, dfrd = $.Deferred(), files = this.files(hashes), cnt = files.length, hash, pcheck = null; if (!cnt || !files[0].phash) { return dfrd.reject(); } hash = files[0].phash; fm.trigger('searchend', { noupdate: true }); fm.request({ data : {cmd : 'open', target : hash}, notify : {type : 'open', cnt : 1, hideCnt : true}, syncOnFail : false }); return dfrd; }; }; /* * File: /js/commands/opennew.js */ /** * @class elFinder command "opennew" * Open folder in new window * * @author Naoki Sawada **/ elFinder.prototype.commands.opennew = function() { var fm = this.fm; this.shortcuts = [{ pattern : (typeof(fm.options.getFileCallback) === 'function'? 'shift+' : '') + 'ctrl+enter' }]; this.getstate = function(select) { var sel = this.files(select), cnt = sel.length; return cnt === 1 ? (sel[0].mime === 'directory' && sel[0].read? 0 : -1) : -1; }; this.exec = function(hashes) { var dfrd = $.Deferred(), files = this.files(hashes), cnt = files.length, opts = this.options, file, loc, url, win; // open folder to new tab (window) if (cnt === 1 && (file = files[0]) && file.mime === 'directory') { loc = window.location; if (opts.url) { url = opts.url; } else { url = loc.pathname; } if (opts.useOriginQuery) { if (!url.match(/\?/)) { url += loc.search; } else if (loc.search) { url += '&' + loc.search.substr(1); } } url += '#elf_' + file.hash; win = window.open(url, '_blank'); setTimeout(function() { win.focus(); }, 1000); return dfrd.resolve(); } else { return dfrd.reject(); } }; }; /* * File: /js/commands/paste.js */ /** * @class elFinder command "paste" * Paste filesfrom clipboard into directory. * If files pasted in its parent directory - files duplicates will created * * @author Dmitry (dio) Levashov **/ elFinder.prototype.commands.paste = function() { this.updateOnSelect = false; this.handlers = { changeclipboard : function() { this.update(); } }; this.shortcuts = [{ pattern : 'ctrl+v shift+insert' }]; this.getstate = function(dst) { if (this._disabled) { return -1; } if (dst) { if (Array.isArray(dst)) { if (dst.length != 1) { return -1; } dst = this.fm.file(dst[0]); } } else { dst = this.fm.cwd(); } return this.fm.clipboard().length && dst.mime == 'directory' && dst.write ? 0 : -1; }; this.exec = function(select, cOpts) { var self = this, fm = self.fm, opts = cOpts || {}, dst = select ? this.files(select)[0] : fm.cwd(), files = fm.clipboard(), cnt = files.length, cut = cnt ? files[0].cut : false, cmd = opts._cmd? opts._cmd : (cut? 'move' : 'copy'), error = 'err' + cmd.charAt(0).toUpperCase() + cmd.substr(1), fpaste = [], fcopy = [], dfrd = $.Deferred() .fail(function(error) { error && fm.error(error); }) .always(function() { fm.unlockfiles({files : $.map(files, function(f) { return f.hash; })}); }), copy = function(files) { return files.length && fm._commands.duplicate ? fm.exec('duplicate', files) : $.Deferred().resolve(); }, paste = function(files) { var dfrd = $.Deferred(), existed = [], hashes = {}, intersect = function(files, names) { var ret = [], i = files.length; while (i--) { $.inArray(files[i].name, names) !== -1 && ret.unshift(i); } return ret; }, confirm = function(ndx) { var i = existed[ndx], file = files[i], last = ndx == existed.length-1; if (!file) { return; } fm.confirm({ title : fm.i18n(cmd + 'Files'), text : ['errExists', file.name, cmd === 'restore'? 'confirmRest' : 'confirmRepl'], all : !last, accept : { label : 'btnYes', callback : function(all) { !last && !all ? confirm(++ndx) : paste(files); } }, reject : { label : 'btnNo', callback : function(all) { var i; if (all) { i = existed.length; while (ndx < i--) { files[existed[i]].remove = true; } } else { files[existed[ndx]].remove = true; } !last && !all ? confirm(++ndx) : paste(files); } }, cancel : { label : 'btnCancel', callback : function() { dfrd.resolve(); } }, buttons : [ { label : 'btnBackup', callback : function(all) { var i; if (all) { i = existed.length; while (ndx < i--) { files[existed[i]].rename = true; } } else { files[existed[ndx]].rename = true; } !last && !all ? confirm(++ndx) : paste(files); } } ] }); }, valid = function(names) { var exists = {}, existedArr; if (names) { if (Array.isArray(names)) { if (names.length) { if (typeof names[0] == 'string') { // elFinder <= 2.1.6 command `is` results existed = intersect(files, names); } else { $.each(names, function(i, v) { exists[v.name] = v.hash; }); existed = intersect(files, $.map(exists, function(h, n) { return n; })); $.each(files, function(i, file) { if (exists[file.name]) { hashes[exists[file.name]] = file.name; } }); } } } else { existedArr = []; existed = $.map(names, function(n) { if (typeof n === 'string') { return n; } else { // support to >=2.1.11 plugin Normalizer, Sanitizer existedArr = existedArr.concat(n); return false; } }); if (existedArr.length) { existed = existed.concat(existedArr); } existed = intersect(files, existed); hashes = names; } } existed.length ? confirm(0) : paste(files); }, paste = function(selFiles) { var renames = [], files = $.grep(selFiles, function(file) { if (file.rename) { renames.push(file.name); } return !file.remove ? true : false; }), cnt = files.length, groups = {}, args = [], targets, reqData; if (!cnt) { return dfrd.resolve(); } targets = $.map(files, function(f) { return f.hash; }); reqData = {cmd : 'paste', dst : dst.hash, targets : targets, cut : cut ? 1 : 0, renames : renames, hashes : hashes, suffix : fm.options.backupSuffix}; if (fm.api < 2.1) { reqData.src = files[0].phash; } fm.request({ data : reqData, notify : {type : cmd, cnt : cnt}, cancel : true, navigate : { toast : opts.noToast? {} : { inbuffer : {msg: fm.i18n(['complete', fm.i18n('cmd' + cmd)]), action: { cmd: 'open', msg: 'cmdopendir', data: [dst.hash], done: 'select', cwdNot: dst.hash }} } } }) .done(function(data) { var dsts = {}, added = data.added && data.added.length? data.added : null; if (cut && added) { // undo/redo $.each(files, function(i, f) { var phash = f.phash, srcHash = function(name) { var hash; $.each(added, function(i, f) { if (f.name === name) { hash = f.hash; return false; } }); return hash; }, shash = srcHash(f.name); if (shash) { if (dsts[phash]) { dsts[phash].push(shash); } else { dsts[phash] = [ shash ]; } } }); if (Object.keys(dsts).length) { data.undo = { cmd : 'move', callback : function() { var reqs = []; $.each(dsts, function(dst, targets) { reqs.push(fm.request({ data : {cmd : 'paste', dst : dst, targets : targets, cut : 1}, notify : {type : 'undo', cnt : targets.length} })); }); return $.when.apply(null, reqs); } }; data.redo = { cmd : 'move', callback : function() { return fm.request({ data : reqData, notify : {type : 'redo', cnt : cnt} }); } }; } } dfrd.resolve(data); }) .fail(function(flg) { dfrd.reject(); if (flg === 0) { // canceling fm.sync(); } }) .always(function() { fm.unlockfiles({files : files}); }); }, internames; if (!fm.isCommandEnabled(self.name, dst.hash) || !files.length) { return dfrd.resolve(); } if (fm.oldAPI) { paste(files); } else { if (!fm.option('copyOverwrite', dst.hash)) { paste(files); } else { internames = $.map(files, function(f) { return f.name; }); dst.hash == fm.cwd().hash ? valid($.map(fm.files(), function(file) { return file.phash == dst.hash ? {hash: file.hash, name: file.name} : null; })) : fm.request({ data : {cmd : 'ls', target : dst.hash, intersect : internames}, notify : {type : 'prepare', cnt : 1, hideCnt : true}, preventFail : true }) .always(function(data) { valid(data.list); }); } } return dfrd; }, parents, fparents, cutDfrd; if (!cnt || !dst || dst.mime != 'directory') { return dfrd.reject(); } if (!dst.write) { return dfrd.reject([error, files[0].name, 'errPerm']); } parents = fm.parents(dst.hash); $.each(files, function(i, file) { if (!file.read) { return !dfrd.reject([error, file.name, 'errPerm']); } if (cut && file.locked) { return !dfrd.reject(['errLocked', file.name]); } if ($.inArray(file.hash, parents) !== -1) { return !dfrd.reject(['errCopyInItself', file.name]); } if (file.mime && file.mime !== 'directory' && ! fm.uploadMimeCheck(file.mime, dst.hash)) { return !dfrd.reject([error, file.name, 'errUploadMime']); } fparents = fm.parents(file.hash); fparents.pop(); if ($.inArray(dst.hash, fparents) !== -1) { if ($.grep(fparents, function(h) { var d = fm.file(h); return d.phash == dst.hash && d.name == file.name ? true : false; }).length) { return !dfrd.reject(['errReplByChild', file.name]); } } if (file.phash == dst.hash) { fcopy.push(file.hash); } else { fpaste.push({ hash : file.hash, phash : file.phash, name : file.name }); } }); if (dfrd.state() === 'rejected') { return dfrd; } cutDfrd = $.Deferred(); if (cut && self.options.moveConfirm) { fm.confirm({ title : 'moveFiles', text : fm.i18n('confirmMove', dst.i18 || dst.name), accept : { label : 'btnYes', callback : function() { cutDfrd.resolve(); } }, cancel : { label : 'btnCancel', callback : function() { cutDfrd.reject(); } } }); } else { cutDfrd.resolve(); } cutDfrd.done(function() { $.when( copy(fcopy), paste(fpaste) ) .done(function(cr, pr) { dfrd.resolve(pr && pr.undo? pr : void(0)); }) .fail(function() { dfrd.reject(); }) .always(function() { cut && fm.clipboard([]); }); }).fail(function() { dfrd.reject(); }); return dfrd; }; }; /* * File: /js/commands/places.js */ /** * @class elFinder command "places" * Regist to Places * * @author Naoki Sawada **/ elFinder.prototype.commands.places = function() { var self = this, fm = this.fm, filter = function(hashes) { var fres = true; return $.grep(self.files(hashes), function(f) { fres = fres && f.mime == 'directory' ? true : false; return fres; }); }, places = null; this.getstate = function(select) { var sel = this.hashes(select), cnt = sel.length; return places && cnt && cnt == filter(sel).length ? 0 : -1; }; this.exec = function(hashes) { var files = this.files(hashes); places.trigger('regist', [ files ]); return $.Deferred().resolve(); }; fm.one('load', function(){ places = fm.ui.places; }); }; /* * File: /js/commands/preference.js */ /** * @class elFinder command "preference" * "Preference" dialog * * @author Naoki Sawada **/ elFinder.prototype.commands.preference = function() { var self = this, fm = this.fm, r = 'replace', tab = '
        • {title}
        • ', base = $('
          '), ul = $('
            '), tabs = $('
            '), sep = '
            ', selfUrl = $('base').length? document.location.href.replace(/#.*$/, '') : '', selectTab = function(tab) { $('#'+fm.namespace+'-preference-tab-'+tab).trigger('mouseover').trigger('click'); openTab = tab; }, clTabActive = fm.res('class', 'tabsactive'), build = function() { var cats = self.options.categories || { 'language' : ['language'], 'theme' : ['theme'], 'toolbar' : ['toolbarPref'], 'workspace' : ['iconSize','columnPref', 'selectAction', 'makefileTypes', 'useStoredEditor', 'editorMaximized', 'useFullscreen', 'showHidden'], 'dialog' : ['autoFocusDialog'], 'selectionInfo' : ['infoItems', 'hashChecker'], 'reset' : ['clearBrowserData'], 'all' : true }, forms = self.options.prefs || ['language', 'theme', 'toolbarPref', 'iconSize', 'columnPref', 'selectAction', 'makefileTypes', 'useStoredEditor', 'editorMaximized', 'useFullscreen', 'showHidden', 'infoItems', 'hashChecker', 'autoFocusDialog', 'clearBrowserData']; if (!fm.cookieEnabled) { delete cats.language; } forms = fm.arrayFlip(forms, true); if (fm.options.getFileCallback) { delete forms.selectAction; } if (!fm.UA.Fullscreen) { delete forms.useFullscreen; } forms.language && (forms.language = (function() { var langSel = $('').on('change', function() { var lang = $(this).val(); fm.storage('lang', lang); $('#'+fm.id).elfinder('reload'); }), optTags = [], langs = self.options.langs || { ar: 'العربية', bg: 'Български', ca: 'Català', cs: 'Čeština', da: 'Dansk', de: 'Deutsch', el: 'Ελληνικά', en: 'English', es: 'Español', fa: 'فارسی', fo: 'Føroyskt', fr: 'Français', fr_CA: 'Français (Canada)', he: 'עברית', hr: 'Hrvatski', hu: 'Magyar', id: 'Bahasa Indonesia', it: 'Italiano', ja: '日本語', ko: '한국어', nl: 'Nederlands', no: 'Norsk', pl: 'Polski', pt_BR: 'Português', ro: 'Română', ru: 'Pусский', si: 'සිංහල', sk: 'Slovenčina', sl: 'Slovenščina', sr: 'Srpski', sv: 'Svenska', tr: 'Türkçe', ug_CN: 'ئۇيغۇرچە', uk: 'Український', vi: 'Tiếng Việt', zh_CN: '简体中文', zh_TW: '正體中文' }; if (!fm.cookieEnabled) { return $(); } $.each(langs, function(lang, name) { optTags.push(''); }); return langSel.append(optTags.join('')).val(fm.lang); })()); forms.theme && (forms.theme = (function() { var cnt = fm.options.themes? Object.keys(fm.options.themes).length : 0; if (cnt === 0 || (cnt === 1 && fm.options.themes.default)) { return null; } var themeSel = $('').on('change', function() { var theme = $(this).val(); fm.changeTheme(theme).storage('theme', theme); }), optTags = [], tpl = { image: '', link: '$2', data: '
            $1
            $2
            ' }, items = ['image', 'description', 'author', 'email', 'license'], render = function(key, data) { }, defBtn = $('').text(fm.i18n('default')).on('click', function(e) { themeSel.val('default').trigger('change'); }), list = $('
            ').on('click', 'button', function() { var val = $(this).data('themeid'); themeSel.val(val).trigger('change'); }); if (!fm.options.themes.default) { themeSel.append(''); } $.each(fm.options.themes, function(id, val) { var opt = $(''), dsc = $('
            '+fm.i18n(id)+'
            '), tm; themeSel.append(opt); list.append(dsc); tm = setTimeout(function() { dsc.find('span.elfinder-spinner').replaceWith(fm.i18n(['errRead', id])); }, 10000); fm.getTheme(id).always(function() { tm && clearTimeout(tm); }).done(function(data) { var link, val = $(), dl = $('
            '); link = data.link? tpl.link.replace(/\$1/g, data.link).replace(/\$3/g, fm.i18n('website')) : '$2'; if (data.name) { opt.html(fm.i18n(data.name)); } dsc.children('legend').html(link.replace(/\$2/g, fm.i18n(data.name) || id)); $.each(items, function(i, key) { var t = tpl[key] || tpl.data, elm; if (data[key]) { elm = t.replace(/\$0/g, fm.escape(key)).replace(/\$1/g, fm.i18n(key)).replace(/\$2/g, fm.i18n(data[key])); if (key === 'image' && data.link) { elm = $(elm).on('click', function() { themeSel.val(id).trigger('change'); }).attr('title', fm.i18n('select')); } dl.append(elm); } }); val = val.add(dl); val = val.add($('
            ').append($('').data('themeid', id).html(fm.i18n('select')))); dsc.find('span.elfinder-spinner').replaceWith(val); }).fail(function() { dsc.find('span.elfinder-spinner').replaceWith(fm.i18n(['errRead', id])); }); }); return $('
            ').append(themeSel.val(fm.theme && fm.theme.id? fm.theme.id : 'default'), defBtn, list); })()); forms.toolbarPref && (forms.toolbarPref = (function() { var pnls = $.map(fm.options.uiOptions.toolbar, function(v) { return Array.isArray(v)? v : null; }), tags = [], hides = fm.storage('toolbarhides') || {}; $.each(pnls, function() { var cmd = this, name = fm.i18n('cmd'+cmd); if (name === 'cmd'+cmd) { name = fm.i18n(cmd); } tags.push(''); }); return $(tags.join(' ')).on('change', 'input', function() { var v = $(this).val(), o = $(this).is(':checked'); if (!o && !hides[v]) { hides[v] = true; } else if (o && hides[v]) { delete hides[v]; } fm.storage('toolbarhides', hides); fm.trigger('toolbarpref'); }); })()); forms.iconSize && (forms.iconSize = (function() { var max = fm.options.uiOptions.cwd.iconsView.sizeMax || 3, size = fm.storage('iconsize') || fm.options.uiOptions.cwd.iconsView.size || 0, sld = $('
            ').slider({ classes: { 'ui-slider-handle': 'elfinder-tabstop', }, value: size, max: max, slide: function(e, ui) { fm.getUI('cwd').trigger('iconpref', {size: ui.value}); }, change: function(e, ui) { fm.storage('iconsize', ui.value); } }); fm.getUI('cwd').on('iconpref', function(e, data) { sld.slider('option', 'value', data.size); }); return sld; })()); forms.columnPref && (forms.columnPref = (function() { var cols = fm.options.uiOptions.cwd.listView.columns, tags = [], hides = fm.storage('columnhides') || {}; $.each(cols, function() { var key = this, name = fm.getColumnName(key); tags.push(''); }); return $(tags.join(' ')).on('change', 'input', function() { var v = $(this).val(), o = $(this).is(':checked'); if (!o && !hides[v]) { hides[v] = true; } else if (o && hides[v]) { delete hides[v]; } fm.storage('columnhides', hides); fm.trigger('columnpref', { repaint: true }); }); })()); forms.selectAction && (forms.selectAction = (function() { var actSel = $('').on('change', function() { var act = $(this).val(); fm.storage('selectAction', act === 'default'? null : act); }), optTags = [], acts = self.options.selectActions, defAct = fm.getCommand('open').options.selectAction || 'open'; if ($.inArray(defAct, acts) === -1) { acts.unshift(defAct); } $.each(acts, function(i, act) { var names = $.map(act.split('/'), function(cmd) { var name = fm.i18n('cmd'+cmd); if (name === 'cmd'+cmd) { name = fm.i18n(cmd); } return name; }); optTags.push(''); }); return actSel.append(optTags.join('')).val(fm.storage('selectAction') || defAct); })()); forms.makefileTypes && (forms.makefileTypes = (function() { var hides = fm.getCommand('edit').getMkfileHides(), getTag = function() { var tags = []; // re-assign hides hides = fm.getCommand('edit').getMkfileHides(); $.each(fm.mimesCanMakeEmpty, function(mime, type) { var name = fm.getCommand('mkfile').getTypeName(mime, type); tags.push(''); }); return tags.join(' '); }, elm = $('
            ').on('change', 'input', function() { var v = $(this).val(), o = $(this).is(':checked'); if (!o && !hides[v]) { hides[v] = true; } else if (o && hides[v]) { delete hides[v]; } fm.storage('mkfileHides', hides); fm.trigger('canMakeEmptyFile'); }).append(getTag()), add = $('
            ').append( $('').on('keydown', function(e) { (e.keyCode === $.ui.keyCode.ENTER) && $(this).next().trigger('click'); }), $('').html(fm.i18n('add')).on('click', function() { var input = $(this).prev(), val = input.val(), uiToast = fm.getUI('toast'), err = function() { uiToast.appendTo(input.closest('.ui-dialog')); fm.toast({ msg: fm.i18n('errUsupportType'), mode: 'warning', onHidden: function() { uiToast.children().length === 1 && uiToast.appendTo(fm.getUI()); } }); input.trigger('focus'); return false; }, tmpMimes; if (!val.match(/\//)) { val = fm.arrayFlip(fm.mimeTypes)[val]; if (!val) { return err(); } input.val(val); } if (!fm.mimeIsText(val) || !fm.mimeTypes[val]) { return err(); } fm.trigger('canMakeEmptyFile', {mimes: [val], unshift: true}); tmpMimes = {}; tmpMimes[val] = fm.mimeTypes[val]; fm.storage('mkfileTextMimes', Object.assign(tmpMimes, fm.storage('mkfileTextMimes') || {})); input.val(''); uiToast.appendTo(input.closest('.ui-dialog')); fm.toast({ msg: fm.i18n(['complete', val + ' (' + tmpMimes[val] + ')']), onHidden: function() { uiToast.children().length === 1 && uiToast.appendTo(fm.getUI()); } }); }), $('').html(fm.i18n('reset')).on('click', function() { fm.one('canMakeEmptyFile', {done: function() { elm.empty().append(getTag()); }}); fm.trigger('canMakeEmptyFile', {resetTexts: true}); }) ), tm; fm.bind('canMakeEmptyFile', {done: function(e) { if (e.data && e.data.mimes && e.data.mimes.length) { elm.empty().append(getTag()); } }}); return $('
            ').append(elm, add); })()); forms.useStoredEditor && (forms.useStoredEditor = $('').prop('checked', (function() { var s = fm.storage('useStoredEditor'); return s? (s > 0) : fm.options.commandsOptions.edit.useStoredEditor; })()).on('change', function(e) { fm.storage('useStoredEditor', $(this).is(':checked')? 1 : -1); })); forms.editorMaximized && (forms.editorMaximized = $('').prop('checked', (function() { var s = fm.storage('editorMaximized'); return s? (s > 0) : fm.options.commandsOptions.edit.editorMaximized; })()).on('change', function(e) { fm.storage('editorMaximized', $(this).is(':checked')? 1 : -1); })); forms.useFullscreen && (forms.useFullscreen = $('').prop('checked', (function() { var s = fm.storage('useFullscreen'); return s? (s > 0) : fm.options.commandsOptions.fullscreen.mode === 'screen'; })()).on('change', function(e) { fm.storage('useFullscreen', $(this).is(':checked')? 1 : -1); })); if (forms.showHidden) { (function() { var setTitle = function() { var s = fm.storage('hide'), t = [], v; if (s && s.items) { $.each(s.items, function(h, n) { t.push(fm.escape(n)); }); } elms.prop('disabled', !t.length)[t.length? 'removeClass' : 'addClass']('ui-state-disabled'); v = t.length? t.join('\n') : ''; forms.showHidden.attr('title',v); useTooltip && forms.showHidden.tooltip('option', 'content', v.replace(/\n/g, '
            ')).tooltip('close'); }, chk = $('').prop('checked', (function() { var s = fm.storage('hide'); return s && s.show; })()).on('change', function(e) { var o = {}; o[$(this).is(':checked')? 'show' : 'hide'] = true; fm.exec('hide', void(0), o); }), btn = $('').append(fm.i18n('reset')).on('click', function() { fm.exec('hide', void(0), {reset: true}); $(this).parent().find('input:first').prop('checked', false); setTitle(); }), elms = $().add(chk).add(btn), useTooltip; forms.showHidden = $('
            ').append(chk, btn); fm.bind('hide', function(e) { var d = e.data; if (!d.opts || (!d.opts.show && !d.opts.hide)) { setTitle(); } }); if (fm.UA.Mobile && $.fn.tooltip) { useTooltip = true; forms.showHidden.tooltip({ classes: { 'ui-tooltip': 'elfinder-ui-tooltip ui-widget-shadow' }, tooltipClass: 'elfinder-ui-tooltip ui-widget-shadow', track: true }).css('user-select', 'none'); btn.css('user-select', 'none'); } setTitle(); })(); } forms.infoItems && (forms.infoItems = (function() { var items = fm.getCommand('info').items, tags = [], hides = fm.storage('infohides') || fm.arrayFlip(fm.options.commandsOptions.info.hideItems, true); $.each(items, function() { var key = this, name = fm.i18n(key); tags.push(''); }); return $(tags.join(' ')).on('change', 'input', function() { var v = $(this).val(), o = $(this).is(':checked'); if (!o && !hides[v]) { hides[v] = true; } else if (o && hides[v]) { delete hides[v]; } fm.storage('infohides', hides); fm.trigger('infopref', { repaint: true }); }); })()); forms.hashChecker && fm.hashCheckers.length && (forms.hashChecker = (function() { var tags = [], enabled = fm.arrayFlip(fm.storage('hashchekcer') || fm.options.commandsOptions.info.showHashAlgorisms, true); $.each(fm.hashCheckers, function() { var cmd = this, name = fm.i18n(cmd); tags.push(''); }); return $(tags.join(' ')).on('change', 'input', function() { var v = $(this).val(), o = $(this).is(':checked'); if (o) { enabled[v] = true; } else if (enabled[v]) { delete enabled[v]; } fm.storage('hashchekcer', $.grep(fm.hashCheckers, function(v) { return enabled[v]; })); }); })()); forms.autoFocusDialog && (forms.autoFocusDialog = $('').prop('checked', (function() { var s = fm.storage('autoFocusDialog'); return s? (s > 0) : fm.options.uiOptions.dialog.focusOnMouseOver; })()).on('change', function(e) { fm.storage('autoFocusDialog', $(this).is(':checked')? 1 : -1); })); forms.clearBrowserData && (forms.clearBrowserData = $('').text(fm.i18n('reset')).button().on('click', function(e) { e.preventDefault(); fm.storage(); $('#'+fm.id).elfinder('reload'); })); $.each(cats, function(id, prefs) { var dls, found; if (prefs === true) { found = 1; } else if (prefs) { dls = $(); $.each(prefs, function(i, n) { var f, title, chks = '', cbox; if (f = forms[n]) { found = 2; title = fm.i18n(n); cbox = $(f).filter('input[type="checkbox"]'); if (!cbox.length) { cbox = $(f).find('input[type="checkbox"]'); } if (cbox.length === 1) { if (!cbox.attr('id')) { cbox.attr('id', 'elfinder-preference-'+n+'-checkbox'); } title = ''; } else if (cbox.length > 1) { chks = ' elfinder-preference-checkboxes'; } dls = dls.add($('
            '+title+'
            ')).add($('
            ').append(f)); } }); } if (found) { ul.append(tab[r](/\{id\}/g, id)[r](/\{title\}/, fm.i18n(id))[r](/\{class\}/, openTab === id? 'elfinder-focus' : '')); if (found === 2) { tabs.append( $('
            ') .hide() .append($('
            ').append(dls)) ); } } }); ul.on('click', 'a', function(e) { var t = $(e.target), h = t.attr('href'); e.preventDefault(); e.stopPropagation(); ul.children().removeClass(clTabActive); t.removeClass('ui-state-hover').parent().addClass(clTabActive); if (h.match(/all$/)) { tabs.addClass('elfinder-preference-taball').children().show(); } else { tabs.removeClass('elfinder-preference-taball').children().hide(); $(h).show(); } }).on('focus blur', 'a', function(e) { $(this).parent().toggleClass('ui-state-focus', e.type === 'focusin'); }).on('mouseenter mouseleave', 'li', function(e) { $(this).toggleClass('ui-state-hover', e.type === 'mouseenter'); }); tabs.find('a,input,select,button').addClass('elfinder-tabstop'); base.append(ul, tabs); dialog = self.fmDialog(base, { title : self.title, width : self.options.width || 600, height: self.options.height || 400, maxWidth: 'window', maxHeight: 'window', autoOpen : false, destroyOnClose : false, allowMinimize : false, open : function() { openTab && selectTab(openTab); openTab = null; }, resize : function() { tabs.height(dialog.height() - ul.outerHeight(true) - (tabs.outerHeight(true) - tabs.height()) - 5); } }) .on('click', function(e) { e.stopPropagation(); }) .css({ overflow: 'hidden' }); dialog.closest('.ui-dialog') .css({ overflow: 'hidden' }) .addClass('elfinder-bg-translucent'); openTab = 'all'; }, dialog, openTab; this.shortcuts = [{ pattern : 'ctrl+comma', description : this.title }]; this.alwaysEnabled = true; this.getstate = function() { return 0; }; this.exec = function(sel, cOpts) { !dialog && build(); if (cOpts) { if (cOpts.tab) { selectTab(cOpts.tab); } else if (cOpts._currentType === 'cwd') { selectTab('workspace'); } } dialog.elfinderdialog('open'); return $.Deferred().resolve(); }; }; /* * File: /js/commands/quicklook.js */ /** * @class elFinder command "quicklook" * Fast preview for some files types * * @author Dmitry (dio) Levashov **/ (elFinder.prototype.commands.quicklook = function() { var self = this, fm = self.fm, /** * window closed state * * @type Number **/ closed = 0, /** * window animated state * * @type Number **/ animated = 1, /** * window opened state * * @type Number **/ opened = 2, /** * window docked state * * @type Number **/ docked = 3, /** * window docked and hidden state * * @type Number **/ dockedhidden = 4, /** * window state * * @type Number **/ state = closed, /** * Event name of update * for fix conflicts with Prototype.JS * * `@see https://github.com/Studio-42/elFinder/pull/2346 * @type String **/ evUpdate = Element.update? 'quicklookupdate' : 'update', /** * navbar icon class * * @type String **/ navicon = 'elfinder-quicklook-navbar-icon', /** * navbar "fullscreen" icon class * * @type String **/ fullscreen = 'elfinder-quicklook-fullscreen', /** * info wrapper class * * @type String */ infocls = 'elfinder-quicklook-info-wrapper', /** * Triger keydown/keypress event with left/right arrow key code * * @param Number left/right arrow key code * @return void **/ navtrigger = function(code) { $(document).trigger($.Event('keydown', { keyCode: code, ctrlKey : false, shiftKey : false, altKey : false, metaKey : false })); }, /** * Return css for closed window * * @param jQuery file node in cwd * @return void **/ closedCss = function(node) { var elf = fm.getUI().offset(), base = (function() { var target = node.find('.elfinder-cwd-file-wrapper'); return target.length? target : node; })(), baseOffset = base.offset() || { top: 0, left: 0 }; return { opacity : 0, width : base.width(), height : base.height() - 30, top : baseOffset.top - elf.top, left : baseOffset.left - elf.left }; }, /** * Return css for opened window * * @return void **/ openedCss = function() { var contain = self.options.contain || fm.options.dialogContained, win = contain? fm.getUI() : $(window), elf = fm.getUI().offset(), w = Math.min(width, win.width()-10), h = Math.min(height, win.height()-80); return { opacity : 1, width : w, height : h, top : parseInt((win.height() - h - 60) / 2 + (contain? 0 : win.scrollTop() - elf.top)), left : parseInt((win.width() - w) / 2 + (contain? 0 : win.scrollLeft() - elf.left)) }; }, mediaNode = {}, support = function(codec, name) { var node = name || codec.substr(0, codec.indexOf('/')), media = mediaNode[node]? mediaNode[node] : (mediaNode[node] = document.createElement(node)), value = false; try { value = media.canPlayType && media.canPlayType(codec); } catch(e) {} return (value && value !== '' && value != 'no')? true : false; }, platformWin = (window.navigator.platform.indexOf('Win') != -1), /** * Opened window width (from config) * * @type Number **/ width, /** * Opened window height (from config) * * @type Number **/ height, /** * Previous style before docked * * @type String **/ prevStyle, /** * elFinder node * * @type jQuery **/ parent, /** * elFinder current directory node * * @type jQuery **/ cwd, /** * Current directory hash * * @type String **/ cwdHash, dockEnabled = false, navdrag = false, navmove = false, navtm = null, leftKey = $.ui.keyCode.LEFT, rightKey = $.ui.keyCode.RIGHT, coverEv = 'mousemove touchstart ' + ('onwheel' in document? 'wheel' : 'onmousewheel' in document? 'mousewheel' : 'DOMMouseScroll'), title = $(''), icon = $('
            '), info = $('
            '),//.hide(), cover = $('
            '), fsicon = $('
            ') .on('click touchstart', function(e) { if (navmove) { return; } var win = self.window, full = win.hasClass(fullscreen), $window = $(window), resize = function() { self.preview.trigger('changesize'); }; e.stopPropagation(); e.preventDefault(); if (full) { navStyle = ''; navShow(); win.toggleClass(fullscreen) .css(win.data('position')); $window.trigger(self.resize).off(self.resize, resize); navbar.off('mouseenter mouseleave'); cover.off(coverEv); } else { win.toggleClass(fullscreen) .data('position', { left : win.css('left'), top : win.css('top'), width : win.width(), height : win.height(), display: 'block' }) .removeAttr('style'); $(window).on(self.resize, resize) .trigger(self.resize); cover.on(coverEv, function(e) { if (! navdrag) { if (e.type === 'mousemove' || e.type === 'touchstart') { navShow(); navtm = setTimeout(function() { if (fm.UA.Mobile || navbar.parent().find('.elfinder-quicklook-navbar:hover').length < 1) { navbar.fadeOut('slow', function() { cover.show(); }); } }, 3000); } if (cover.is(':visible')) { coverHide(); cover.data('tm', setTimeout(function() { cover.show(); }, 3000)); } } }).show().trigger('mousemove'); navbar.on('mouseenter mouseleave', function(e) { if (! navdrag) { if (e.type === 'mouseenter') { navShow(); } else { cover.trigger('mousemove'); } } }); } if (fm.zIndex) { win.css('z-index', fm.zIndex + 1); } if (fm.UA.Mobile) { navbar.attr('style', navStyle); } else { navbar.attr('style', navStyle).draggable(full ? 'destroy' : { start: function() { navdrag = true; navmove = true; cover.show(); navShow(); }, stop: function() { navdrag = false; navStyle = self.navbar.attr('style'); requestAnimationFrame(function() { navmove = false; }); } }); } $(this).toggleClass(navicon+'-fullscreen-off'); var collection = win; if (parent.is('.ui-resizable')) { collection = collection.add(parent); } collection.resizable(full ? 'enable' : 'disable').removeClass('ui-state-disabled'); win.trigger('viewchange'); } ), updateOnSel = function() { self.update(void(0), (function() { var fm = self.fm, files = fm.selectedFiles(), cnt = files.length, inDock = self.docked(), getInfo = function() { var ts = 0; $.each(files, function(i, f) { var t = parseInt(f.ts); if (ts >= 0) { if (t > ts) { ts = t; } } else { ts = 'unknown'; } }); return { hash : files[0].hash + '/' + (+new Date()), name : fm.i18n('items') + ': ' + cnt, mime : 'group', size : spinner, ts : ts, files : $.map(files, function(f) { return f.hash; }), getSize : true }; }; if (! cnt) { cnt = 1; files = [fm.cwd()]; } return (cnt === 1)? files[0] : getInfo(); })()); }, navShow = function() { if (self.window.hasClass(fullscreen)) { navtm && clearTimeout(navtm); navtm = null; // if use `show()` it make infinite loop with old jQuery (jQuery/jQuery UI: 1.8.0/1.9.0) // see #1478 https://github.com/Studio-42/elFinder/issues/1478 navbar.stop(true, true).css('display', 'block'); coverHide(); } }, coverHide = function() { cover.data('tm') && clearTimeout(cover.data('tm')); cover.removeData('tm'); cover.hide(); }, prev = $('
            ').on('click touchstart', function(e) { ! navmove && navtrigger(leftKey); return false; }), next = $('
            ').on('click touchstart', function(e) { ! navmove && navtrigger(rightKey); return false; }), navbar = $('
            ') .append(prev) .append(fsicon) .append(next) .append('
            ') .append($('
            ').on('click touchstart', function(e) { ! navmove && self.window.trigger('close'); return false; })) , titleClose = $('').on('mousedown', function(e) { e.stopPropagation(); self.window.trigger('close'); }), titleDock = $('').on('mousedown', function(e) { e.stopPropagation(); if (! self.docked()) { self.window.trigger('navdockin'); } else { self.window.trigger('navdockout'); } }), spinner = '' + fm.i18n('calc') + '' + '', navStyle = '', init = true, dockHeight, getSize, tm4cwd, dockedNode, selectTm; /** * Any flags for each plugin */ this.flags = {}; this.cover = cover; this.evUpdate = evUpdate; (this.navbar = navbar)._show = navShow; this.resize = 'resize.'+fm.namespace; this.info = $('
            ').addClass(infocls) .append(icon) .append(info); this.autoPlay = function() { if (self.opened()) { return !! self.options[self.docked()? 'dockAutoplay' : 'autoplay']; } return false; }; this.preview = $('
            ') // clean info/icon .on('change', function() { navShow(); navbar.attr('style', navStyle); self.docked() && navbar.hide(); self.preview.attr('style', '').removeClass('elfinder-overflow-auto'); self.info.attr('style', '').hide(); self.cover.removeClass('elfinder-quicklook-coverbg'); icon.removeAttr('class').attr('style', ''); info.html(''); }) // update info/icon .on(evUpdate, function(e) { var preview = self.preview, file = e.file, tpl = '
            {value}
            ', update = function() { var win = self.window.css('overflow', 'hidden'); name = fm.escape(file.i18 || file.name); !file.read && e.stopImmediatePropagation(); self.window.data('hash', file.hash); self.preview.off('changesize').trigger('change').children().remove(); title.html(name); prev.css('visibility', ''); next.css('visibility', ''); if (file.hash === fm.cwdId2Hash(cwd.find('[id]:not(.elfinder-cwd-parent):first').attr('id'))) { prev.css('visibility', 'hidden'); } if (file.hash === fm.cwdId2Hash(cwd.find('[id]:last').attr('id'))) { next.css('visibility', 'hidden'); } if (file.mime === 'directory') { getSizeHashes = [ file.hash ]; } else if (file.mime === 'group' && file.getSize) { getSizeHashes = file.files; } info.html( tpl.replace(/\{value\}/, name) + tpl.replace(/\{value\}/, fm.mime2kind(file)) + tpl.replace(/\{value\}/, getSizeHashes.length ? spinner : fm.formatSize(file.size)) + tpl.replace(/\{value\}/, fm.i18n('modify')+': '+ fm.formatDate(file)) ); if (getSizeHashes.length) { getSize = fm.getSize(getSizeHashes).done(function(data) { info.find('span.elfinder-spinner').parent().html(data.formated); }).fail(function() { info.find('span.elfinder-spinner').parent().html(fm.i18n('unknown')); }).always(function() { getSize = null; }); getSize._hash = file.hash; } icon.addClass('elfinder-cwd-icon ui-corner-all '+fm.mime2class(file.mime)); if (file.icon) { icon.css(fm.getIconStyle(file, true)); } self.info.attr('class', infocls); if (file.csscls) { self.info.addClass(file.csscls); } if (file.read && (tmb = fm.tmb(file))) { $('') .hide() .appendTo(self.preview) .on('load', function() { icon.addClass(tmb.className).css('background-image', "url('"+tmb.url+"')"); $(this).remove(); }) .attr('src', tmb.url); } self.info.delay(100).fadeIn(10); if (self.window.hasClass(fullscreen)) { cover.trigger('mousemove'); } win.css('overflow', ''); }, tmb, name, getSizeHashes = []; if (file && ! Object.keys(file).length) { file = fm.cwd(); } if (file && getSize && getSize.state() === 'pending' && getSize._hash !== file.hash) { getSize.reject(); } if (file && (e.forceUpdate || self.window.data('hash') !== file.hash)) { update(); } else { e.stopImmediatePropagation(); } }); this.window = $('
            ') .hide() .addClass(fm.UA.Touch? 'elfinder-touch' : '') .on('click', function(e) { var win = this; e.stopPropagation(); if (state === opened) { requestAnimationFrame(function() { state === opened && fm.toFront(win); }); } }) .append( $('
            ') .append( $('').append( titleClose, titleDock ), title ), this.preview, self.info.hide(), cover.hide(), navbar ) .draggable({handle : 'div.elfinder-quicklook-titlebar'}) .on('open', function(e, clcss) { var win = self.window, file = self.value, node = fm.getUI('cwd'), open = function(status) { state = status; self.update(1, self.value); self.change(); win.trigger('resize.' + fm.namespace); }; if (!init && state === closed) { if (file && file.hash !== cwdHash) { node = fm.cwdHash2Elm(file.hash.split('/', 2)[0]); } navStyle = ''; navbar.attr('style', ''); state = animated; node.trigger('scrolltoview'); coverHide(); win.css(clcss || closedCss(node)) .show() .animate(openedCss(), 550, function() { open(opened); navShow(); }); fm.toFront(win); } else if (state === dockedhidden) { fm.getUI('navdock').data('addNode')(dockedNode); open(docked); self.preview.trigger('changesize'); fm.storage('previewDocked', '1'); if (fm.getUI('navdock').width() === 0) { win.trigger('navdockout'); } } }) .on('close', function(e, dfd) { var win = self.window, preview = self.preview.trigger('change'), file = self.value, hash = (win.data('hash') || '').split('/', 2)[0], close = function(status, winhide) { state = status; winhide && fm.toHide(win); preview.children().remove(); self.update(0, self.value); win.data('hash', ''); dfd && dfd.resolve(); }, node; if (self.opened()) { getSize && getSize.state() === 'pending' && getSize.reject(); if (! self.docked()) { state = animated; win.hasClass(fullscreen) && fsicon.click(); (hash && (node = cwd.find('#'+hash)).length) ? win.animate(closedCss(node), 500, function() { preview.off('changesize'); close(closed, true); }) : close(closed, true); } else { dockedNode = fm.getUI('navdock').data('removeNode')(self.window.attr('id'), 'detach'); close(dockedhidden); fm.storage('previewDocked', '2'); } } }) .on('navdockin', function(e, data) { var w = self.window, box = fm.getUI('navdock'), height = dockHeight || box.width(), opts = data || {}; if (init) { opts.init = true; } state = docked; prevStyle = w.attr('style'); w.toggleClass('ui-front').removeClass('ui-widget').draggable('disable').resizable('disable').removeAttr('style').css({ width: '100%', height: height, boxSizing: 'border-box', paddingBottom: 0, zIndex: 'unset' }); navbar.hide(); titleDock.toggleClass('ui-icon-plusthick ui-icon-minusthick elfinder-icon-full elfinder-icon-minimize'); fm.toHide(w, true); box.data('addNode')(w, opts); self.preview.trigger('changesize'); fm.storage('previewDocked', '1'); }) .on('navdockout', function(e) { var w = self.window, box = fm.getUI('navdock'), dfd = $.Deferred(), clcss = closedCss(self.preview); dockHeight = w.outerHeight(); box.data('removeNode')(w.attr('id'), fm.getUI()); w.toggleClass('ui-front').addClass('ui-widget').draggable('enable').resizable('enable').attr('style', prevStyle); titleDock.toggleClass('ui-icon-plusthick ui-icon-minusthick elfinder-icon-full elfinder-icon-minimize'); state = closed; w.trigger('open', clcss); fm.storage('previewDocked', '0'); }) .on('resize.' + fm.namespace, function() { self.preview.trigger('changesize'); }); /** * This command cannot be disable by backend * * @type Boolean **/ this.alwaysEnabled = true; /** * Selected file * * @type Object **/ this.value = null; this.handlers = { // save selected file select : function(e, d) { selectTm && cancelAnimationFrame(selectTm); if (! e.data || ! e.data.selected || ! e.data.selected.length) { selectTm = requestAnimationFrame(function() { self.opened() && updateOnSel(); }); } else { self.opened() && updateOnSel(); } }, error : function() { self.window.is(':visible') && self.window.trigger('close'); }, 'searchshow searchhide' : function() { this.opened() && this.window.trigger('close'); }, navbarshow : function() { requestAnimationFrame(function() { self.docked() && self.preview.trigger('changesize'); }); }, destroy : function() { self.window.remove(); } }; this.shortcuts = [{ pattern : 'space' }]; this.support = { audio : { ogg : support('audio/ogg;'), webm: support('audio/webm;'), mp3 : support('audio/mpeg;'), wav : support('audio/wav;'), m4a : support('audio/mp4;') || support('audio/x-m4a;') || support('audio/aac;'), flac: support('audio/flac;'), amr : support('audio/amr;') }, video : { ogg : support('video/ogg;'), webm : support('video/webm;'), mp4 : support('video/mp4;'), mkv : support('video/x-matroska;') || support('video/webm;'), '3gp': support('video/3gpp;') || support('video/mp4;'), // try as mp4 m3u8 : support('application/x-mpegURL', 'video') || support('application/vnd.apple.mpegURL', 'video'), mpd : support('application/dash+xml', 'video') } }; // for GC mediaNode = {}; /** * Return true if quickLoock window is hiddenReturn true if quickLoock window is visible and not animated * * @return Boolean **/ this.closed = function() { return (state == closed || state == dockedhidden); }; /** * Return true if quickLoock window is visible and not animated * * @return Boolean **/ this.opened = function() { return state == opened || state == docked; }; /** * Return true if quickLoock window is in NavDock * * @return Boolean **/ this.docked = function() { return state == docked; }; /** * Adds an integration into help dialog. * * @param Object opts options */ this.addIntegration = function(opts) { requestAnimationFrame(function() { fm.trigger('helpIntegration', Object.assign({cmd: 'quicklook'}, opts)); }); }; /** * Init command. * Add default plugins and init other plugins * * @return Object **/ this.init = function() { var o = this.options, win = this.window, preview = this.preview, i, p, cwdDispInlineRegex; width = o.width > 0 ? parseInt(o.width) : 450; height = o.height > 0 ? parseInt(o.height) : 300; if (o.dockHeight !== 'auto') { dockHeight = parseInt(o.dockHeight); if (! dockHeight) { dockHeight = void(0); } } fm.one('load', function() { dockEnabled = fm.getUI('navdock').data('dockEnabled'); ! dockEnabled && titleDock.hide(); parent = fm.getUI(); cwd = fm.getUI('cwd'); if (fm.zIndex) { win.css('z-index', fm.zIndex + 1); } win.appendTo(parent); // close window on escape $(document).on('keydown.'+fm.namespace, function(e) { e.keyCode == $.ui.keyCode.ESCAPE && self.opened() && ! self.docked() && win.hasClass('elfinder-frontmost') && win.trigger('close'); }); win.resizable({ handles : 'se', minWidth : 350, minHeight : 120, resize : function() { // use another event to avoid recursion in fullscreen mode // may be there is clever solution, but i cant find it :( preview.trigger('changesize'); } }); self.change(function() { if (self.opened()) { if (self.value) { if (self.value.tmb && self.value.tmb == 1) { // try re-get file object self.value = Object.assign({}, fm.file(self.value.hash)); } preview.trigger($.Event(evUpdate, {file : self.value})); } } }); preview.on(evUpdate, function(e) { var file, hash, serach; if (file = e.file) { hash = file.hash; serach = (fm.searchStatus.mixed && fm.searchStatus.state > 1); if (file.mime !== 'directory') { if (parseInt(file.size) || file.mime.match(o.mimeRegexNotEmptyCheck)) { // set current dispInlineRegex self.dispInlineRegex = cwdDispInlineRegex; if (serach || fm.optionsByHashes[hash]) { try { self.dispInlineRegex = new RegExp(fm.option('dispInlineRegex', hash), 'i'); } catch(e) { try { self.dispInlineRegex = new RegExp(!fm.isRoot(file)? fm.option('dispInlineRegex', file.phash) : fm.options.dispInlineRegex, 'i'); } catch(e) { self.dispInlineRegex = /^$/; } } } } else { // do not preview of file that size = 0 e.stopImmediatePropagation(); } } else { self.dispInlineRegex = /^$/; } self.info.show(); } else { e.stopImmediatePropagation(); } }); $.each(fm.commands.quicklook.plugins || [], function(i, plugin) { if (typeof(plugin) == 'function') { new plugin(self); } }); }).one('open', function() { var dock = Number(fm.storage('previewDocked') || o.docked), win; if (dockEnabled && dock >= 1) { win = self.window; self.exec(); win.trigger('navdockin', { init : true }); if (dock === 2) { win.trigger('close'); } else { self.update(void(0), fm.cwd()); self.change(); } } init = false; }).bind('open', function() { cwdHash = fm.cwd().hash; self.value = fm.cwd(); // set current volume dispInlineRegex try { cwdDispInlineRegex = new RegExp(fm.option('dispInlineRegex'), 'i'); } catch(e) { cwdDispInlineRegex = /^$/; } }).bind('change', function(e) { if (e.data && e.data.changed && self.opened()) { $.each(e.data.changed, function() { if (self.window.data('hash') === this.hash) { self.window.data('hash', null); self.preview.trigger(evUpdate); return false; } }); } }).bind('navdockresizestart navdockresizestop', function(e) { cover[e.type === 'navdockresizestart'? 'show' : 'hide'](); }); }; this.getstate = function() { return self.opened()? 1 : 0; }; this.exec = function() { self.closed() && updateOnSel(); self.enabled() && self.window.trigger(self.opened() ? 'close' : 'open'); return $.Deferred().resolve(); }; this.hideinfo = function() { this.info.stop(true, true).hide(); }; }).prototype = { forceLoad : true }; // this is required command /* * File: /js/commands/quicklook.plugins.js */ elFinder.prototype.commands.quicklook.plugins = [ /** * Images preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { var mimes = ['image/jpeg', 'image/png', 'image/gif', 'image/svg+xml', 'image/x-ms-bmp'], getDimSize = ql.fm.returnBytes((ql.options.getDimThreshold || 0)), preview = ql.preview, WebP, flipMime; // webp support WebP = new Image(); WebP.onload = WebP.onerror = function() { if (WebP.height == 2) { mimes.push('image/webp'); } }; WebP.src='data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA'; // what kind of images we can display $.each(navigator.mimeTypes, function(i, o) { var mime = o.type; if (mime.indexOf('image/') === 0 && $.inArray(mime, mimes)) { mimes.push(mime); } }); preview.on(ql.evUpdate, function(e) { var fm = ql.fm, file = e.file, showed = false, dimreq = null, setdim = function(dim) { var rfile = fm.file(file.hash); rfile.width = dim[0]; rfile.height = dim[1]; }, show = function() { var elm, varelm, memSize, width, height, prop; dimreq && dimreq.state && dimreq.state() === 'pending' && dimreq.reject(); if (showed) { return; } showed = true; elm = img.get(0); memSize = file.width && file.height? {w: file.width, h: file.height} : (elm.naturalWidth? null : {w: img.width(), h: img.height()}); memSize && img.removeAttr('width').removeAttr('height'); width = file.width || elm.naturalWidth || elm.width || img.width(); height = file.height || elm.naturalHeight || elm.height || img.height(); if (!file.width || !file.height) { setdim([width, height]); } memSize && img.width(memSize.w).height(memSize.h); prop = (width/height).toFixed(2); preview.on('changesize', function() { var pw = parseInt(preview.width()), ph = parseInt(preview.height()), w, h; if (prop < (pw/ph).toFixed(2)) { h = ph; w = Math.floor(h * prop); } else { w = pw; h = Math.floor(w/prop); } img.width(w).height(h).css('margin-top', h < ph ? Math.floor((ph - h)/2) : 0); }) .trigger('changesize'); //show image img.fadeIn(100); }, hideInfo = function() { loading.remove(); // hide info/icon ql.hideinfo(); }, url, img, loading, prog, m, opDfd; if (!flipMime) { flipMime = fm.arrayFlip(mimes); } if (flipMime[file.mime] && ql.dispInlineRegex.test(file.mime)) { // this is our file - stop event propagation e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); img = $('') .hide() .appendTo(preview) .on('load', function() { hideInfo(); show(); }) .on('error', function() { loading.remove(); }); opDfd = fm.openUrl(file.hash, false, function(url) { img.attr('src', url); }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); if (file.width && file.height) { show(); } else if (file.size > getDimSize) { dimreq = fm.request({ data : {cmd : 'dim', target : file.hash}, preventDefault : true }) .done(function(data) { if (data.dim) { var dim = data.dim.split('x'); file.width = dim[0]; file.height = dim[1]; setdim(dim); show(); } }); } } }); }, /** * TIFF image preview * * @param object ql elFinder.commands.quicklook */ function(ql) { var fm = ql.fm, mime = 'image/tiff', preview = ql.preview; if (window.Worker && window.Uint8Array) { preview.on(ql.evUpdate, function(e) { var file = e.file, err = function(e) { wk && wk.terminate(); loading.remove(); fm.debug('error', e); }, setdim = function(dim) { var rfile = fm.file(file.hash); rfile.width = dim[0]; rfile.height = dim[1]; }, loading, prog, url, base, wk, opDfd; if (file.mime === mime) { e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); // stop loading on change file if not loaded yet preview.one('change', function() { wk && wk.terminate(); loading.remove(); }); opDfd = fm.getContents(file.hash, 'arraybuffer', { progressBar: prog }).done(function(data) { if (data) { base = $('
            ').css({width:'100%',height:'100%'}).hide().appendTo(preview); try { wk = fm.getWorker(); wk.onmessage = function(res) { var data = res.data, cv, co, id, prop; wk && wk.terminate(); cv = document.createElement('canvas'); co = cv.getContext('2d'); cv.width = data.width; cv.height = data.height; id = co.createImageData(data.width, data.height); (id).data.set(new Uint8Array(data.image)); co.putImageData(id, 0, 0); base.append(cv).show(); loading.remove(); prop = (data.width/data.height).toFixed(2); preview.on('changesize', function() { var pw = parseInt(preview.width()), ph = parseInt(preview.height()), w, h; if (prop < (pw/ph).toFixed(2)) { h = ph; w = Math.floor(h * prop); } else { w = pw; h = Math.floor(w/prop); } $(cv).width(w).height(h).css('margin-top', h < ph ? Math.floor((ph - h)/2) : 0); }).trigger('changesize'); if (!file.width || !file.height) { setdim([data.width, data.height]); } ql.hideinfo(); }; wk.onerror = err; wk.postMessage({ scripts: [fm.options.cdns.tiff, fm.getWorkerUrl('quicklook.tiff.js')], data: { data: data } }); } catch(e) { err(e); } } else { err(); } }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } }); } }, /** * PSD(Adobe Photoshop data) preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mimes = fm.arrayFlip(['image/vnd.adobe.photoshop', 'image/x-photoshop']), preview = ql.preview, load = function(url, img, loading) { try { fm.replaceXhrSend(); PSD.fromURL(url).then(function(psd) { var prop; img.attr('src', psd.image.toBase64()); requestAnimationFrame(function() { prop = (img.width()/img.height()).toFixed(2); preview.on('changesize', function() { var pw = parseInt(preview.width()), ph = parseInt(preview.height()), w, h; if (prop < (pw/ph).toFixed(2)) { h = ph; w = Math.floor(h * prop); } else { w = pw; h = Math.floor(w/prop); } img.width(w).height(h).css('margin-top', h < ph ? Math.floor((ph - h)/2) : 0); }).trigger('changesize'); loading.remove(); // hide info/icon ql.hideinfo(); //show image img.fadeIn(100); }); }, function() { loading.remove(); img.remove(); }); fm.restoreXhrSend(); } catch(e) { fm.restoreXhrSend(); loading.remove(); img.remove(); } }, PSD; preview.on(ql.evUpdate, function(e) { var file = e.file, url, img, loading, prog, m, _define, _require, opDfd; if (mimes[file.mime] && fm.options.cdns.psd && ! fm.UA.ltIE10 && ql.dispInlineRegex.test(file.mime)) { // this is our file - stop event propagation e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); opDfd = fm.openUrl(file.hash, 'sameorigin', function(url) { if (url) { img = $('').hide().appendTo(preview); if (PSD) { load(url, img, loading); } else { _define = window.define; _require = window.require; window.require = null; window.define = null; fm.loadScript( [ fm.options.cdns.psd ], function() { PSD = require('psd'); _define? (window.define = _define) : (delete window.define); _require? (window.require = _require) : (delete window.require); load(url, img, loading); } ); } } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } }); }, /** * HTML preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mimes = fm.arrayFlip(['text/html', 'application/xhtml+xml']), preview = ql.preview; preview.on(ql.evUpdate, function(e) { var file = e.file, jqxhr, loading, prog; if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax)) { e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); // stop loading on change file if not loaded yet preview.one('change', function() { jqxhr.state() == 'pending' && jqxhr.reject(); }).addClass('elfinder-overflow-auto'); jqxhr = fm.request({ data : {cmd : 'get', target : file.hash, conv : 1, _t : file.ts}, options : {type: 'get', cache : true}, preventDefault : true, progressBar : prog }) .done(function(data) { ql.hideinfo(); var doc = $('').appendTo(preview)[0].contentWindow.document; doc.open(); doc.write(data.content); doc.close(); }) .always(function() { loading.remove(); }); } }); }, /** * MarkDown preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mimes = fm.arrayFlip(['text/x-markdown']), preview = ql.preview, marked = null, show = function(data, loading) { ql.hideinfo(); var doc = $('').appendTo(preview)[0].contentWindow.document; doc.open(); doc.write((marked.parse || marked)(data.content)); doc.close(); loading.remove(); }, error = function(loading) { marked = false; loading.remove(); }; preview.on(ql.evUpdate, function(e) { var file = e.file, jqxhr, loading, prog; if (mimes[file.mime] && fm.options.cdns.marked && marked !== false && ql.dispInlineRegex.test(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax)) { e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); // stop loading on change file if not loaded yet preview.one('change', function() { jqxhr.state() == 'pending' && jqxhr.reject(); }).addClass('elfinder-overflow-auto'); jqxhr = fm.request({ data : {cmd : 'get', target : file.hash, conv : 1, _t : file.ts}, options : {type: 'get', cache : true}, preventDefault : true, progressBar : prog }) .done(function(data) { if (marked || window.marked) { if (!marked) { marked = window.marked; } show(data, loading); } else { fm.loadScript([fm.options.cdns.marked], function(res) { marked = res || window.marked || false; delete window.marked; if (marked) { show(data, loading); } else { error(loading); } }, { tryRequire: true, error: function() { error(loading); } } ); } }) .fail(function() { error(loading); }); } }); }, /** * PDF/ODT/ODS/ODP preview with ViewerJS * * @param elFinder.commands.quicklook */ function(ql) { if (ql.options.viewerjs) { var fm = ql.fm, preview = ql.preview, opts = ql.options.viewerjs, mimes = opts.url? fm.arrayFlip(opts.mimes || []) : [], win = ql.window, navi = ql.navbar, setNavi = function() { navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '30px' : ''); }; if (opts.url) { preview.on('update', function(e) { var file = e.file, node, loading, prog, opDfd; if (mimes[file.mime] && (file.mime !== 'application/pdf' || !opts.pdfNative || !ql.flags.pdfNative)) { e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); opDfd = fm.openUrl(file.hash, 'sameorigin', function(url) { if (url) { node = $('') .css('background-color', 'transparent') .on('load', function() { ql.hideinfo(); loading.remove(); node.css('background-color', '#fff'); }) .on('error', function() { loading.remove(); node.remove(); }) .appendTo(preview) .attr('src', opts.url + '#' + url); win.on('viewchange.viewerjs', setNavi); setNavi(); preview.one('change', function() { win.off('viewchange.viewerjs'); loading.remove(); node.off('load').remove(); }); } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } }); } } }, /** * PDF preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mime = 'application/pdf', preview = ql.preview, active = false, urlhash = '', firefox, toolbar; if ((fm.UA.Safari && fm.OS === 'mac' && !fm.UA.iOS) || fm.UA.IE || fm.UA.Firefox) { active = true; } else { $.each(navigator.plugins, function(i, plugins) { $.each(plugins, function(i, plugin) { if (plugin.type === mime) { return !(active = true); } }); }); } ql.flags.pdfNative = active; if (active) { if (typeof ql.options.pdfToolbar !== 'undefined' && !ql.options.pdfToolbar) { urlhash = '#toolbar=0'; } preview.on(ql.evUpdate, function(e) { var file = e.file, opDfd; if (active && file.mime === mime && ql.dispInlineRegex.test(file.mime)) { e.stopImmediatePropagation(); opDfd = fm.openUrl(file.hash, false, function(url) { if (url) { ql.hideinfo(); ql.cover.addClass('elfinder-quicklook-coverbg'); $('') .on('error', function(e) { active = false; ql.update(void(0), fm.cwd()); ql.update(void(0), file); }) .appendTo(preview); } }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } }); } }, /** * Flash preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mime = 'application/x-shockwave-flash', preview = ql.preview, active = false; $.each(navigator.plugins, function(i, plugins) { $.each(plugins, function(i, plugin) { if (plugin.type === mime) { return !(active = true); } }); }); active && preview.on(ql.evUpdate, function(e) { var file = e.file, node, opDfd; if (file.mime === mime && ql.dispInlineRegex.test(file.mime)) { e.stopImmediatePropagation(); opDfd = fm.openUrl(file.hash, false, function(url) { if (url) { ql.hideinfo(); node = $('') .appendTo(preview); } }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } }); }, /** * HTML5 audio preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, preview = ql.preview, mimes = { 'audio/mpeg' : 'mp3', 'audio/mpeg3' : 'mp3', 'audio/mp3' : 'mp3', 'audio/x-mpeg3' : 'mp3', 'audio/x-mp3' : 'mp3', 'audio/x-wav' : 'wav', 'audio/wav' : 'wav', 'audio/x-m4a' : 'm4a', 'audio/aac' : 'm4a', 'audio/mp4' : 'm4a', 'audio/x-mp4' : 'm4a', 'audio/ogg' : 'ogg', 'audio/webm' : 'webm', 'audio/flac' : 'flac', 'audio/x-flac' : 'flac', 'audio/amr' : 'amr' }, node, curHash, win = ql.window, navi = ql.navbar, AMR, autoplay, controlsList = typeof ql.options.mediaControlsList === 'string' && ql.options.mediaControlsList? ' controlsList="' + fm.escape(ql.options.mediaControlsList) + '"' : '', setNavi = function() { navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '50px' : ''); }, getNode = function(src, hash) { return $('') .on('change', function(e) { // Firefox fire change event on seek or volume change e.stopPropagation(); }) .on('error', function(e) { node && node.data('hash') === hash && reset(); }) .data('hash', hash) .appendTo(preview); }, amrToWavUrl = function(hash) { var dfd = $.Deferred(), loader = $.Deferred().done(function() { var opDfd; opDfd = fm.getContents(hash, 'arraybuffer', { progressBar: prog }).done(function(data) { try { var buffer = AMR.toWAV(new Uint8Array(data)); if (buffer) { dfd.resolve(URL.createObjectURL(new Blob([buffer], { type: 'audio/x-wav' }))); } else { dfd.reject(); } } catch(e) { dfd.reject(); } }).fail(function() { dfd.reject(); }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); }).fail(function() { AMR = false; dfd.reject(); }), _AMR; if (window.TextEncoder && window.URL && URL.createObjectURL && typeof AMR === 'undefined') { // previous window.AMR _AMR = window.AMR; delete window.AMR; fm.loadScript( [ fm.options.cdns.amr ], function() { AMR = window.AMR? window.AMR : false; // restore previous window.AMR window.AMR = _AMR; loader[AMR? 'resolve':'reject'](); }, { error: function() { loader.reject(); } } ); } else { loader[AMR? 'resolve':'reject'](); } return dfd; }, play = function(player) { var hash = node.data('hash'), playPromise; autoplay && (playPromise = player.play()); // uses "playPromise['catch']" instead "playPromise.catch" to support Old IE if (playPromise && playPromise['catch']) { playPromise['catch'](function(e) { if (!player.paused) { node && node.data('hash') === hash && reset(); } }); } }, reset = function() { if (node && node.parent().length) { var elm = node[0], url = node.children('source').attr('src'); win.off('viewchange.audio'); try { elm.pause(); node.empty(); if (url.match(/^blob:/)) { URL.revokeObjectURL(url); } elm.src = ''; elm.load(); } catch(e) {} node.remove(); node = null; } }, loading, prog; preview.on(ql.evUpdate, function(e) { var file = e.file, type = mimes[file.mime], html5, opDfd; if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime) && ((html5 = ql.support.audio[type]) || (type === 'amr'))) { autoplay = ql.autoPlay(); curHash = file.hash; if (!html5) { if (fm.options.cdns.amr && type === 'amr' && AMR !== false) { e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); node = getNode('', curHash); amrToWavUrl(file.hash).done(function(url) { loading.remove(); if (curHash === file.hash) { var elm = node[0]; try { node.children('source').attr('src', url); elm.pause(); elm.load(); play(elm); win.on('viewchange.audio', setNavi); setNavi(); } catch(e) { URL.revokeObjectURL(url); node.remove(); } } else { URL.revokeObjectURL(url); } }).fail(function() { node.remove(); }); } } else { e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); opDfd = fm.openUrl(curHash, false, function(url) { loading.remove(); if (url) { node = getNode(url, curHash); play(node[0]); win.on('viewchange.audio', setNavi); setNavi(); } else { node.remove(); } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } } }).one('change', reset); }, /** * HTML5 video preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, preview = ql.preview, mimes = { 'video/mp4' : 'mp4', 'video/x-m4v' : 'mp4', 'video/quicktime' : 'mp4', 'video/mpeg' : 'mpeg', 'video/ogg' : 'ogg', 'application/ogg' : 'ogg', 'video/webm' : 'webm', 'video/x-matroska': 'mkv', 'video/3gpp' : '3gp', 'application/vnd.apple.mpegurl' : 'm3u8', 'application/x-mpegurl' : 'm3u8', 'application/dash+xml' : 'mpd', 'video/x-flv' : 'flv', 'video/x-msvideo' : 'avi' }, node, win = ql.window, navi = ql.navbar, cHls, cDash, pDash, cFlv, cVideojs, autoplay, tm, loading, prog, controlsList = typeof ql.options.mediaControlsList === 'string' && ql.options.mediaControlsList? ' controlsList="' + fm.escape(ql.options.mediaControlsList) + '"' : '', setNavi = function() { if (fm.UA.iOS) { if (win.hasClass('elfinder-quicklook-fullscreen')) { preview.css('height', '-webkit-calc(100% - 50px)'); navi._show(); } else { preview.css('height', ''); } } else { navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '50px' : ''); } }, render = function(file, opts) { var errTm = function(e) { if (err > 1) { tm && clearTimeout(tm); tm = setTimeout(function() { !canPlay && reset(true); }, 800); } }, err = 0, cssClass = '', canPlay; //reset(); pDash = null; opts = opts || {}; if (opts.cssClass) { cssClass = ' ' + opts.cssClass; } ql.hideinfo(); node = $('') .on('change', function(e) { // Firefox fire change event on seek or volume change e.stopPropagation(); }) .on('timeupdate progress', errTm) .on('canplay', function() { canPlay = true; }) .data('hash', file.hash); // can not handling error event with jQuery `on` event handler node[0].addEventListener('error', function(e) { if (opts.src && fm.convAbsUrl(opts.src) === fm.convAbsUrl(e.target.src)) { ++err; errTm(); } }, true); if (opts.src) { node.append(''); } node.appendTo(preview); win.on('viewchange.video', setNavi); setNavi(); }, loadHls = function(file) { var hls, opDfd; opDfd = fm.openUrl(file.hash, false, function(url) { loading.remove(); if (url) { render(file); hls = new cHls(); hls.loadSource(url); hls.attachMedia(node[0]); if (autoplay) { hls.on(cHls.Events.MANIFEST_PARSED, function() { play(node[0]); }); } } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); }, loadDash = function(file) { var opDfd; opDfd = fm.openUrl(file.hash, false, function(url) { var debug; loading.remove(); if (url) { render(file); pDash = window.dashjs.MediaPlayer().create(); debug = pDash.getDebug(); if (debug.setLogLevel) { debug.setLogLevel(dashjs.Debug.LOG_LEVEL_FATAL); } else if (debug.setLogToBrowserConsole) { debug.setLogToBrowserConsole(false); } pDash.initialize(node[0], url, autoplay); pDash.on('error', function(e) { reset(true); }); } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); }, loadFlv = function(file) { var opDfd if (!cFlv.isSupported()) { cFlv = false; return; } opDfd = fm.openUrl(file.hash, false, function(url) { loading.remove(); if (url) { var player = cFlv.createPlayer({ type: 'flv', url: url }); render(file); player.on(cFlv.Events.ERROR, function() { player.destroy(); reset(true); }); player.attachMediaElement(node[0]); player.load(); play(player); } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); }, loadVideojs = function(file) { var opDfd; opDfd = fm.openUrl(file.hash, false, function(url) { loading.remove(); if (url) { render(file, { src: url, cssClass: 'video-js' }); node[0].src = url; cVideojs(node[0], { autoplay: true }); } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); }, play = function(player) { var hash = node.data('hash'), playPromise; autoplay && (playPromise = player.play()); // uses "playPromise['catch']" instead "playPromise.catch" to support Old IE if (playPromise && playPromise['catch']) { playPromise['catch'](function(e) { if (!player.paused) { node && node.data('hash') === hash && reset(true); } }); } }, reset = function(showInfo) { tm && clearTimeout(tm); if (node && node.parent().length) { var elm = node[0]; win.off('viewchange.video'); pDash && pDash.reset(); try { elm.pause(); node.empty(); elm.src = ''; elm.load(); } catch(e) {} node.remove(); node = null; } showInfo && ql.info.show(); }; preview.on(ql.evUpdate, function(e) { var file = e.file, mime = file.mime.toLowerCase(), type = mimes[mime], stock, playPromise, opDfd; if (mimes[mime] && ql.dispInlineRegex.test(file.mime) /*&& (((type === 'm3u8' || (type === 'mpd' && !fm.UA.iOS) || type === 'flv') && !fm.UA.ltIE10) || ql.support.video[type])*/) { autoplay = ql.autoPlay(); loading = $('
            '+fm.i18n('nowLoading')+'
            '); prog = $('
            ').appendTo(loading); if (ql.support.video[type] && (type !== 'm3u8' || fm.UA.Safari)) { e.stopImmediatePropagation(); loading.appendTo(ql.info.find('.elfinder-quicklook-info')); opDfd = fm.openUrl(file.hash, false, function(url) { loading.remove(); if (url) { render(file, { src: url }); play(node[0]); } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } else { if (cHls !== false && fm.options.cdns.hls && type === 'm3u8') { e.stopImmediatePropagation(); loading.appendTo(ql.info.find('.elfinder-quicklook-info')); if (cHls) { loadHls(file); } else { stock = window.Hls; delete window.Hls; fm.loadScript( [ fm.options.cdns.hls ], function(res) { cHls = res || window.Hls || false; window.Hls = stock; cHls && loadHls(file); }, { tryRequire: true, error : function() { cHls = false; } } ); } } else if (cDash !== false && fm.options.cdns.dash && type === 'mpd') { e.stopImmediatePropagation(); loading.appendTo(ql.info.find('.elfinder-quicklook-info')); if (cDash) { loadDash(file); } else { fm.loadScript( [ fm.options.cdns.dash ], function() { // dashjs require window.dashjs in global scope cDash = window.dashjs? true : false; cDash && loadDash(file); }, { tryRequire: true, error : function() { cDash = false; } } ); } } else if (cFlv !== false && fm.options.cdns.flv && type === 'flv') { e.stopImmediatePropagation(); loading.appendTo(ql.info.find('.elfinder-quicklook-info')); if (cFlv) { loadFlv(file); } else { stock = window.flvjs; delete window.flvjs; fm.loadScript( [ fm.options.cdns.flv ], function(res) { cFlv = res || window.flvjs || false; window.flvjs = stock; cFlv && loadFlv(file); }, { tryRequire: true, error : function() { cFlv = false; } } ); } } else if (fm.options.cdns.videojs) { e.stopImmediatePropagation(); loading.appendTo(ql.info.find('.elfinder-quicklook-info')); if (cVideojs) { loadVideojs(file); } else { fm.loadScript( [ fm.options.cdns.videojs + '/video.min.js' ], function(res) { cVideojs = res || window.videojs || false; //window.flvjs = stock; cVideojs && loadVideojs(file); }, { tryRequire: true, error : function() { cVideojs = false; } } ).loadCss([fm.options.cdns.videojs + '/video-js.min.css']); } } } } }).one('change', reset); }, /** * Audio/video preview plugin using browser plugins * * @param elFinder.commands.quicklook **/ function(ql) { var preview = ql.preview, mimes = [], node, win = ql.window, navi = ql.navbar; $.each(navigator.plugins, function(i, plugins) { $.each(plugins, function(i, plugin) { (plugin.type.indexOf('audio/') === 0 || plugin.type.indexOf('video/') === 0) && mimes.push(plugin.type); }); }); mimes = ql.fm.arrayFlip(mimes); preview.on(ql.evUpdate, function(e) { var file = e.file, mime = file.mime, video, opDfd, loading, prog, setNavi = function() { navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '50px' : ''); }; if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime)) { e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); opDfd = ql.fm.openUrl(file.hash, false, function(url) { loading.remove(); if (url) { (video = mime.indexOf('video/') === 0) && ql.hideinfo(); node = $('') .appendTo(preview); win.on('viewchange.embed', setNavi); setNavi(); } }, { progressBar: prog }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } }).one('change', function() { if (node && node.parent().length) { win.off('viewchange.embed'); node.remove(); node= null; } }); }, /** * Archive(zip|gzip|tar|bz2) preview plugin using https://github.com/imaya/zlib.js * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mimes = fm.arrayFlip(['application/zip', 'application/x-gzip', 'application/x-tar', 'application/x-bzip2']), preview = ql.preview, sizeMax = fm.returnBytes(ql.options.unzipMaxSize || 0), Zlib = (fm.options.cdns.zlibUnzip && fm.options.cdns.zlibGunzip)? true : false, bzip2 = fm.options.cdns.bzip2? true : false; if (window.Worker && window.Uint8Array && window.DataView) { preview.on(ql.evUpdate, function(e) { var file = e.file, isTar = (file.mime === 'application/x-tar'), isBzip2 = (file.mime === 'application/x-bzip2'), isZlib = (file.mime === 'application/zip' || file.mime === 'application/x-gzip'); if (mimes[file.mime] && (!sizeMax || file.size <= sizeMax) && ( isTar || (isBzip2 && bzip2) || (isZlib && Zlib) )) { var jqxhr, wk, loading, prog, url, req = function() { jqxhr = fm.getContents(file.hash, 'arraybuffer', { progressBar: prog }) .fail(function() { loading.remove(); }) .done(function(data) { var unzip, filenames, err = function(e) { wk && wk.terminate(); loading.remove(); if (isZlib) { Zlib = false; } else if (isBzip2) { bzip2 = false; } fm.debug('error', e); }; try { wk = fm.getWorker(); wk.onmessage = function(res) { wk && wk.terminate(); loading.remove(); if (!res.data || res.data.error) { new Error(res.data && res.data.error? res.data.error : ''); } else { makeList(res.data.files); } }; wk.onerror = err; if (file.mime === 'application/x-tar') { wk.postMessage({ scripts: [fm.getWorkerUrl('quicklook.unzip.js')], data: { type: 'tar', bin: data } }); } else if (file.mime === 'application/zip') { wk.postMessage({ scripts: [fm.options.cdns.zlibUnzip, fm.getWorkerUrl('quicklook.unzip.js')], data: { type: 'zip', bin: data } }); } else if (file.mime === 'application/x-gzip') { wk.postMessage({ scripts: [fm.options.cdns.zlibGunzip, fm.getWorkerUrl('quicklook.unzip.js')], data: { type: 'gzip', bin: data } }); } else if (file.mime === 'application/x-bzip2') { wk.postMessage({ scripts: [fm.options.cdns.bzip2, fm.getWorkerUrl('quicklook.unzip.js')], data: { type: 'bzip2', bin: data } }); } } catch (e) { err(e); } }); }, makeList = function(filenames) { var header, list, doc, tsize = 0; if (filenames && filenames.length) { filenames = $.map(filenames, function(str) { return fm.decodeRawString(str); }); filenames.sort(); list = fm.escape(filenames.join("\n").replace(/\{formatSize\((\d+)\)\}/g, function(m, s) { tsize += parseInt(s); return fm.formatSize(s); })); header = ''+fm.escape(file.mime)+' ('+fm.formatSize(file.size)+' / '+fm.formatSize(tsize)+')'+'
            '; doc = $('
            '+header+'
            '+list+'
            ') .on('touchstart', function(e) { if ($(this)['scroll' + (fm.direction === 'ltr'? 'Right' : 'Left')]() > 5) { e.originalEvent._preventSwipeX = true; } }) .appendTo(preview); ql.hideinfo(); } loading.remove(); }; // this is our file - stop event propagation e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); // stop loading on change file if not loaded yet preview.one('change', function() { jqxhr.state() === 'pending' && jqxhr.reject(); wk && wk.terminate(); loading.remove(); }); req(); } }); } }, /** * RAR Archive preview plugin using https://github.com/43081j/rar.js * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mimes = fm.arrayFlip(['application/x-rar']), preview = ql.preview, RAR; if (window.DataView) { preview.on(ql.evUpdate, function(e) { var file = e.file; if (mimes[file.mime] && fm.options.cdns.rar && RAR !== false) { var loading, prog, url, archive, abort, getList = function(url) { if (abort) { loading.remove(); return; } try { archive = RAR({ file: url, type: 2, xhrHeaders: fm.customHeaders, xhrFields: fm.xhrFields }, function(err) { loading.remove(); var filenames = [], header, doc; if (abort || err) { // An error occurred (not a rar, read error, etc) err && fm.debug('error', err); return; } $.each(archive.entries, function() { filenames.push(this.path + (this.size? ' (' + fm.formatSize(this.size) + ')' : '')); }); if (filenames.length) { filenames = $.map(filenames, function(str) { return fm.decodeRawString(str); }); filenames.sort(); header = ''+fm.escape(file.mime)+' ('+fm.formatSize(file.size)+')'+'
            '; doc = $('
            '+header+'
            '+fm.escape(filenames.join("\n"))+'
            ') .on('touchstart', function(e) { if ($(this)['scroll' + (fm.direction === 'ltr'? 'Right' : 'Left')]() > 5) { e.originalEvent._preventSwipeX = true; } }) .appendTo(preview); ql.hideinfo(); } }); } catch(e) { loading.remove(); } }, error = function() { RAR = false; loading.remove(); }, _RAR, opDfd; // this is our file - stop event propagation e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); // stop loading on change file if not loaded yet preview.one('change', function() { archive && (archive.abort = true); loading.remove(); abort = true; }); opDfd = fm.openUrl(file.hash, 'sameorigin', function(url) { if (url) { if (RAR) { getList(url); } else { if (window.RarArchive) { _RAR = window.RarArchive; delete window.RarArchive; } fm.loadScript( [ fm.options.cdns.rar ], function() { if (fm.hasRequire) { require(['rar'], function(RarArchive) { RAR = RarArchive; getList(url); }, error); } else { if (RAR = window.RarArchive) { if (_RAR) { window.RarArchive = _RAR; } else { delete window.RarArchive; } getList(url); } else { error(); } } }, { tryRequire: true, error : error } ); } } }, { progressBar: prog, temporary: true }); // stop loading on change file if not loaded yet preview.one('change', function() { opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject(); }); } }); } }, /** * CAD-Files and 3D-Models online viewer on sharecad.org * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mimes = fm.arrayFlip(ql.options.sharecadMimes || []), preview = ql.preview, win = ql.window, node; if (ql.options.sharecadMimes.length) { ql.addIntegration({ title: 'ShareCAD.org CAD and 3D-Models viewer', link: 'https://sharecad.org/DWGOnlinePlugin' }); } preview.on(ql.evUpdate, function(e) { var file = e.file; if (mimes[file.mime.toLowerCase()] && fm.option('onetimeUrl', file.hash)) { var win = ql.window, loading, prog, url; e.stopImmediatePropagation(); if (file.url == '1') { preview.hide(); $('
            ').appendTo(ql.info.find('.elfinder-quicklook-info')) .on('click', function() { var self = $(this); self.html(''); fm.request({ data : {cmd : 'url', target : file.hash}, preventDefault : true, progressBar : prog }) .always(function() { self.html(''); }) .done(function(data) { var rfile = fm.file(file.hash); file.url = rfile.url = data.url || ''; if (file.url) { preview.trigger({ type: ql.evUpdate, file: file, forceUpdate: true }); } }); }); } if (file.url !== '' && file.url != '1') { preview.one('change', function() { loading.remove(); node.off('load').remove(); node = null; }).addClass('elfinder-overflow-auto'); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); url = fm.convAbsUrl(fm.url(file.hash)); node = $('') .css('background-color', 'transparent') .appendTo(preview) .on('load', function() { ql.hideinfo(); loading.remove(); ql.preview.after(ql.info); $(this).css('background-color', '#fff').show(); }) .on('error', function() { loading.remove(); ql.preview.after(ql.info); }) .attr('src', '//sharecad.org/cadframe/load?url=' + encodeURIComponent(url)); ql.info.after(ql.preview); } } }); }, /** * KML preview with GoogleMaps API * * @param elFinder.commands.quicklook */ function(ql) { var fm = ql.fm, mimes = { 'application/vnd.google-earth.kml+xml' : true, 'application/vnd.google-earth.kmz' : true }, preview = ql.preview, gMaps, loadMap, wGmfail, fail, mapScr; if (ql.options.googleMapsApiKey) { ql.addIntegration({ title: 'Google Maps', link: 'https://www.google.com/intl/' + fm.lang.replace('_', '-') + '/help/terms_maps.html' }); gMaps = (window.google && google.maps); // start load maps loadMap = function(file, node, prog) { var mapsOpts = ql.options.googleMapsOpts.maps; fm.forExternalUrl(file.hash, { progressBar: prog }).done(function(url) { if (url) { try { new gMaps.KmlLayer(url, Object.assign({ map: new gMaps.Map(node.get(0), mapsOpts) }, ql.options.googleMapsOpts.kml)); ql.hideinfo(); } catch(e) { fail(); } } else { fail(); } }); }; // keep stored error handler if exists wGmfail = window.gm_authFailure; // on error function fail = function() { mapScr = null; }; // API script url mapScr = 'https://maps.googleapis.com/maps/api/js?key=' + ql.options.googleMapsApiKey; // error handler window.gm_authFailure = function() { fail(); wGmfail && wGmfail(); }; preview.on(ql.evUpdate, function(e) { var file = e.file; if (mapScr && mimes[file.mime.toLowerCase()]) { var win = ql.window, getLink = (file.url == '1' && !fm.option('onetimeUrl', file.hash)), loading, prog, url, node; e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); if (getLink) { preview.hide(); $('
            ').appendTo(ql.info.find('.elfinder-quicklook-info')) .on('click', function() { var self = $(this); self.html(''); fm.request({ data : {cmd : 'url', target : file.hash}, preventDefault : true, progressBar : prog }) .always(function() { loading.remove(); self.html(''); }) .done(function(data) { var rfile = fm.file(file.hash); file.url = rfile.url = data.url || ''; if (file.url) { preview.trigger({ type: ql.evUpdate, file: file, forceUpdate: true }); } }); }); } if (file.url !== '' && !getLink) { node = $('
            ').appendTo(preview); preview.one('change', function() { node.remove(); node = null; }); if (!gMaps) { fm.loadScript([mapScr], function() { gMaps = window.google && google.maps; gMaps && loadMap(file, node, prog); }); } else { loadMap(file, node, prog); } } } }); } }, /** * Any supported files preview plugin using (Google docs | MS Office) online viewer * * @param elFinder.commands.quicklook **/ function(ql) { var fm = ql.fm, mimes = Object.assign(fm.arrayFlip(ql.options.googleDocsMimes || [], 'g'), fm.arrayFlip(ql.options.officeOnlineMimes || [], 'm')), preview = ql.preview, win = ql.window, navi = ql.navbar, urls = { g: 'docs.google.com/gview?embedded=true&url=', m: 'view.officeapps.live.com/op/embed.aspx?wdStartOn=0&src=' }, navBottom = { g: '56px', m: '24px' }, mLimits = { xls : 5242880, // 5MB xlsb : 5242880, xlsx : 5242880, xlsm : 5242880, other: 10485760 // 10MB }, node, enable; if (ql.options.googleDocsMimes.length) { enable = true; ql.addIntegration({ title: 'Google Docs Viewer', link: 'https://docs.google.com/' }); } if (ql.options.officeOnlineMimes.length) { enable = true; ql.addIntegration({ title: 'MS Online Doc Viewer', link: 'https://products.office.com/office-online/view-office-documents-online' }); } if (enable) { preview.on(ql.evUpdate, function(e) { var file = e.file, type, dfd; // 25MB is maximum filesize of Google Docs prevew if (file.size <= 26214400 && (type = mimes[file.mime])) { var win = ql.window, setNavi = function() { navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? navBottom[type] : ''); }, ext = fm.mimeTypes[file.mime], getLink = (file.url == '1' && !fm.option('onetimeUrl', file.hash)), loading, prog, url, tm; if (type === 'm') { if ((mLimits[ext] && file.size > mLimits[ext]) || file.size > mLimits.other) { type = 'g'; } } if (getLink) { preview.hide(); $('
            ').appendTo(ql.info.find('.elfinder-quicklook-info')) .on('click', function() { var self = $(this); self.html(''); fm.request({ data : {cmd : 'url', target : file.hash}, preventDefault : true }) .always(function() { self.html(''); }) .done(function(data) { var rfile = fm.file(file.hash); file.url = rfile.url = data.url || ''; if (file.url) { preview.trigger({ type: ql.evUpdate, file: file, forceUpdate: true }); } }); }); } if (file.url !== '' && !getLink) { e.stopImmediatePropagation(); preview.one('change', function() { dfd && dfd.status && dfd.status() === 'pending' && dfd.reject(); win.off('viewchange.googledocs'); loading.remove(); node.off('load').remove(); node = null; }).addClass('elfinder-overflow-auto'); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); node = $('') .css('background-color', 'transparent') .appendTo(preview); dfd = fm.forExternalUrl(file.hash, { progressBar: prog }).done(function(url) { var load = function() { try { if (node && (!node.attr('src') || node.get(0).contentWindow.document/*maybe HTTP 204*/)) { node.attr('src', 'https://' + urls[type] + encodeURIComponent(url)); // Retry because Google Docs viewer sometimes returns HTTP 204 tm = setTimeout(load, 2000); } } catch(e) {} }; if (url) { if (file.ts) { url += (url.match(/\?/)? '&' : '?') + '_t=' + file.ts; } node.on('load', function() { tm && clearTimeout(tm); ql.hideinfo(); loading.remove(); ql.preview.after(ql.info); $(this).css('background-color', '#fff').show(); }) .on('error', function() { tm && clearTimeout(tm); loading.remove(); ql.preview.after(ql.info); }); load(); } else { loading.remove(); node.remove(); } }); win.on('viewchange.googledocs', setNavi); setNavi(); ql.info.after(ql.preview); } } }); } }, /** * Texts preview plugin * * @param elFinder.commands.quicklook **/ function(ql) { "use strict"; var fm = ql.fm, preview = ql.preview, textLines = parseInt(ql.options.textInitialLines) || 150, prettifyLines = parseInt(ql.options.prettifyMaxLines) || 500, PR, _PR, error = function() { prettify = function() { return false; }; _PR && (window.PR = _PR); PR = false; }, prettify = function(node) { if (fm.options.cdns.prettify) { prettify = function(node) { setTimeout(function() { PRcheck(node); }, 100); return 'pending'; }; if (window.PR) { _PR = window.PR; } fm.loadScript([fm.options.cdns.prettify + (fm.options.cdns.prettify.match(/\?/)? '&' : '?') + 'autorun=false'], function(wPR) { PR = wPR || window.PR; if (typeof PR === 'object') { prettify = function() { return true; }; if (_PR) { window.PR = _PR; } else { delete window.PR; } exec(node); } else { error(); } }, { tryRequire: true, error : error }); } else { error(); } }, exec = function(node) { if (node && !node.hasClass('prettyprinted')) { node.css('cursor', 'wait'); requestAnimationFrame(function() { PR.prettyPrint && PR.prettyPrint(null, node.get(0)); node.css('cursor', ''); }); } }, PRcheck = function(node) { var status = prettify(node); if (status === true) { exec(node); } }; preview.on(ql.evUpdate, function(e) { var file = e.file, mime = file.mime, jqxhr, loading, prog, encSelect; if (fm.mimeIsText(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax) && PR !== false) { e.stopImmediatePropagation(); loading = $('
            '+fm.i18n('nowLoading')+'
            ').appendTo(ql.info.find('.elfinder-quicklook-info')); prog = $('
            ').appendTo(loading); // stop loading on change file if not loadin yet preview.one('change', function() { jqxhr.state() == 'pending' && jqxhr.reject(); encSelect && encSelect.remove(); }); jqxhr = fm.request({ data : {cmd : 'get', target : file.hash, conv : (file.encoding || 1), _t : file.ts}, options : {type: 'get', cache : true}, preventDefault : true, progressBar : prog }) .done(function(data) { var reg = new RegExp('^(data:'+file.mime.replace(/([.+])/g, '\\$1')+';base64,)', 'i'), text = data.content, part, more, node, lines, m; if (typeof text !== 'string') { return; } ql.hideinfo(); if (window.atob && (m = text.match(reg))) { text = atob(text.substr(m[1].length)); } lines = text.match(/([^\r\n]{1,100}[\r\n]*)/g); more = lines.length - textLines; if (more > 10) { part = lines.splice(0, textLines).join(''); } else { more = 0; } node = $('
            '); if (more) { node.append($('

            ' + fm.i18n('linesLeft', fm.toLocaleString(more)) + '
            ') .on('click', function() { var top = node.scrollTop(); $(this).remove(); node.children('pre').removeClass('prettyprinted').text(text).scrollTop(top); if (lines.length <= prettifyLines) { PRcheck(node); } }) ); } node.children('pre').text(part || text); node.on('touchstart', function(e) { if ($(this)['scroll' + (fm.direction === 'ltr'? 'Right' : 'Left')]() > 5) { e.originalEvent._preventSwipeX = true; } }).appendTo(preview); // make toast message if (data.toasts && Array.isArray(data.toasts)) { $.each(data.toasts, function() { this.msg && fm.toast(this); }); } PRcheck(node); }) .always(function(data) { var cmdEdit, sel, head; if (cmdEdit = fm.getCommand('edit')) { head = []; if (data && data.encoding) { head.push({value: data.encoding}); } head.push({value: 'UTF-8'}); sel = cmdEdit.getEncSelect(head); sel.on('change', function() { file.encoding = sel.val(); fm.cache(file, 'change'); preview.trigger({ type: ql.evUpdate, file: file, forceUpdate: true }); }); encSelect = $('
            ').append(sel); ql.window.append(encSelect); } loading.remove(); }); } }); } ]; /* * File: /js/commands/reload.js */ /** * @class elFinder command "reload" * Sync files and folders * * @author Dmitry (dio) Levashov **/ (elFinder.prototype.commands.reload = function() { "use strict"; var self = this, search = false; this.alwaysEnabled = true; this.updateOnSelect = true; this.shortcuts = [{ pattern : 'ctrl+shift+r f5' }]; this.getstate = function() { return 0; }; this.init = function() { this.fm.bind('search searchend', function() { search = this.type == 'search'; }); }; this.fm.bind('contextmenu', function(){ var fm = self.fm; if (fm.options.sync >= 1000) { self.extra = { icon: 'accept', node: $('') .attr({title: fm.i18n('autoSync')}) .on('click touchstart', function(e){ if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) { return; } e.stopPropagation(); e.preventDefault(); $(this).parent() .toggleClass('ui-state-disabled', fm.options.syncStart) .parent().removeClass('ui-state-hover'); fm.options.syncStart = !fm.options.syncStart; fm.autoSync(fm.options.syncStart? null : 'stop'); }).on('ready', function(){ $(this).parent().toggleClass('ui-state-disabled', !fm.options.syncStart).css('pointer-events', 'auto'); }) }; } }); this.exec = function() { var fm = this.fm; if (!search) { var dfrd = fm.sync(), timeout = setTimeout(function() { fm.notify({type : 'reload', cnt : 1, hideCnt : true}); dfrd.always(function() { fm.notify({type : 'reload', cnt : -1}); }); }, fm.notifyDelay); return dfrd.always(function() { clearTimeout(timeout); fm.trigger('reload'); }); } else { $('div.elfinder-toolbar > div.'+fm.res('class', 'searchbtn') + ' > span.ui-icon-search').click(); } }; }).prototype = { forceLoad : true }; // this is required command /* * File: /js/commands/rename.js */ /** * @class elFinder command "rename". * Rename selected file. * * @author Dmitry (dio) Levashov, dio@std42.ru * @author Naoki Sawada **/ elFinder.prototype.commands.rename = function() { "use strict"; // set alwaysEnabled to allow root rename on client size if (this.fm.options.enableRootRename !== false) { this.alwaysEnabled = true; } this.syncTitleOnChange = true; var self = this, fm = self.fm, enableRootRename = fm.options.enableRootRename !== false, request = function(dfrd, targtes, file, name) { var sel = targtes? [file.hash].concat(targtes) : [file.hash], cnt = sel.length, data = {}, rootNames; fm.lockfiles({files : sel}); if (fm.isRoot(file) && !file.netkey && enableRootRename) { if (!(rootNames = fm.storage('rootNames'))) { rootNames = {}; } if (name === '') { if (rootNames[file.hash]) { file.name = file._name; file.i18 = file._i18; delete rootNames[file.hash]; delete file._name; delete file._i18; } else { dfrd && dfrd.reject(); fm.unlockfiles({files : sel}).trigger('selectfiles', {files : sel}); return; } } else { if (typeof file._name === 'undefined') { file._name = file.name; file._i18 = file.i18; } file.name = rootNames[file.hash] = name; delete file.i18; } fm.storage('rootNames', rootNames); data = { changed: [file] }; fm.updateCache(data); fm.change(data); dfrd && dfrd.resolve(data); fm.unlockfiles({files : sel}).trigger('selectfiles', {files : sel}); return; } data = { cmd : 'rename', name : name, target : file.hash }; if (cnt > 1) { data['targets'] = targtes; if (name.match(/\*/)) { data['q'] = name; } } fm.request({ data : data, notify : {type : 'rename', cnt : cnt}, navigate : {} }) .fail(function(error) { var err = fm.parseError(error); dfrd && dfrd.reject(); if (! err || ! Array.isArray(err) || err[0] !== 'errRename') { fm.sync(); } }) .done(function(data) { var cwdHash; if (data.added && data.added.length && cnt === 1) { data.undo = { cmd : 'rename', callback : function() { return fm.request({ data : {cmd : 'rename', target : data.added[0].hash, name : file.name}, notify : {type : 'undo', cnt : 1} }); } }; data.redo = { cmd : 'rename', callback : function() { return fm.request({ data : {cmd : 'rename', target : file.hash, name : name}, notify : {type : 'rename', cnt : 1} }); } }; } dfrd && dfrd.resolve(data); if (!(cwdHash = fm.cwd().hash) || cwdHash === file.hash) { fm.exec('open', $.map(data.added, function(f) { return (f.mime === 'directory')? f.hash : null; })[0]); } }) .always(function() { fm.unlockfiles({files : sel}).trigger('selectfiles', {files : sel}); } ); }, getHint = function(name, target) { var sel = target || fm.selected(), splits = fm.splitFileExtention(name), f1 = fm.file(sel[0]), f2 = fm.file(sel[1]), ext, hint, add; ext = splits[1]? ('.' + splits[1]) : ''; if (splits[1] && splits[0] === '*') { // change extention hint = '"' + fm.splitFileExtention(f1.name)[0] + ext + '", '; hint += '"' + fm.splitFileExtention(f2.name)[0] + ext + '"'; } else if (splits[0].length > 1) { if (splits[0].substr(-1) === '*') { // add prefix add = splits[0].substr(0, splits[0].length - 1); hint = '"' + add + f1.name+'", '; hint += '"' + add + f2.name+'"'; } else if (splits[0].substr(0, 1) === '*') { // add suffix add = splits[0].substr(1); hint = '"'+fm.splitFileExtention(f1.name)[0] + add + ext + '", '; hint += '"'+fm.splitFileExtention(f2.name)[0] + add + ext + '"'; } } if (!hint) { hint = '"'+splits[0] + '1' + ext + '", "' + splits[0] + '2' + ext + '"'; } if (sel.length > 2) { hint += ' ...'; } return hint; }, batchRename = function() { var sel = fm.selected(), tplr = '', mkChk = function(node, label) { return $('').prepend(node); }, name = $(''), num = $(tplr), prefix = $(tplr), suffix = $(tplr), extention = $(tplr), checks = $('
            ').append( mkChk(num, 'plusNumber'), mkChk(prefix, 'asPrefix'), mkChk(suffix, 'asSuffix'), mkChk(extention, 'changeExtention') ), preview = $('
            '), node = $('
            ').append( $('
            ').append(name), $('
            ').append(checks), preview ), opts = { title : fm.i18n('batchRename'), modal : true, destroyOnClose : true, width: Math.min(380, fm.getUI().width() - 20), buttons : {}, open : function() { name.on('input', mkPrev).trigger('focus'); } }, getName = function() { var vName = name.val(), ext = fm.splitFileExtention(fm.file(sel[0]).name)[1]; if (vName !== '' || num.is(':checked')) { if (prefix.is(':checked')) { vName += '*'; } else if (suffix.is(':checked')) { vName = '*' + vName + '.' + ext; } else if (extention.is(':checked')) { vName = '*.' + vName; } else if (ext) { vName += '.' + ext; } } return vName; }, mkPrev = function() { var vName = getName(); if (vName !== '') { preview.html(fm.i18n(['renameMultiple', sel.length, getHint(vName)])); } else { preview.empty(); } }, radios = checks.find('input:radio').on('change', mkPrev), dialog; opts.buttons[fm.i18n('btnApply')] = function() { var vName = getName(), file, targets; if (vName !== '') { dialog.elfinderdialog('close'); targets = sel; file = fm.file(targets.shift()); request(void(0), targets, file, vName); } }; opts.buttons[fm.i18n('btnCancel')] = function() { dialog.elfinderdialog('close'); }; if ($.fn.checkboxradio) { radios.checkboxradio({ create: function(e, ui) { if (this === num.get(0)) { num.prop('checked', true).change(); } } }); } else { checks.buttonset({ create: function(e, ui) { num.prop('checked', true).change(); } }); } dialog = self.fmDialog(node, opts); }; this.noChangeDirOnRemovedCwd = true; this.shortcuts = [{ pattern : 'f2' + (fm.OS == 'mac' ? ' enter' : '') }, { pattern : 'shift+f2', description : 'batchRename', callback : function() { fm.selected().length > 1 && batchRename(); } }]; this.getstate = function(select) { var sel = this.files(select), cnt = sel.length, phash, ext, mime, brk, state, isRoot; if (!cnt) { return -1; } if (cnt > 1 && sel[0].phash) { phash = sel[0].phash; ext = fm.splitFileExtention(sel[0].name)[1].toLowerCase(); mime = sel[0].mime; } if (cnt === 1) { isRoot = fm.isRoot(sel[0]); } state = (cnt === 1 && ((enableRootRename && fm.cookieEnabled && isRoot) || !sel[0].locked) || (fm.api > 2.1030 && cnt === $.grep(sel, function(f) { if (!brk && !f.locked && f.phash === phash && !fm.isRoot(f) && (mime === f.mime || ext === fm.splitFileExtention(f.name)[1].toLowerCase())) { return true; } else { brk && (brk = true); return false; } }).length)) ? 0 : -1; // because alwaysEnabled = true, it need check disabled on connector if (!isRoot && state === 0 && fm.option('disabledFlip', sel[0].hash)['rename']) { state = -1; } if (state !== -1 && cnt > 1) { self.extra = { icon: 'preference', node: $('') .attr({title: fm.i18n('batchRename')}) .on('click touchstart', function(e){ if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) { return; } e.stopPropagation(); e.preventDefault(); fm.getUI().trigger('click'); // to close the context menu immediately batchRename(); }) }; } else { delete self.extra; } return state; }; this.exec = function(hashes, cOpts) { var cwd = fm.getUI('cwd'), sel = hashes || (fm.selected().length? fm.selected() : false) || [fm.cwd().hash], cnt = sel.length, file = fm.file(sel.shift()), filename = '.elfinder-cwd-filename', opts = cOpts || {}, incwd = (fm.cwd().hash == file.hash), type = (opts._currentType === 'navbar' || opts._currentType === 'files')? opts._currentType : (incwd? 'navbar' : 'files'), navbar = (type !== 'files'), target = fm[navbar? 'navHash2Elm' : 'cwdHash2Elm'](file.hash), tarea = (!navbar && fm.storage('view') != 'list'), split = function(name) { var ext = fm.splitFileExtention(name)[1]; return [name.substr(0, name.length - ext.length - 1), ext]; }, unselect = function() { requestAnimationFrame(function() { input && input.trigger('blur'); }); }, rest = function(){ if (!overlay.is(':hidden')) { overlay.elfinderoverlay('hide').off('click close', cancel); } pnode.removeClass('ui-front') .css('position', '') .off('unselect.'+fm.namespace, unselect); if (tarea) { node && node.css('max-height', ''); } else if (!navbar) { pnode.css('width', '') .parent('td').css('overflow', ''); } }, colwidth, dfrd = $.Deferred() .fail(function(error) { var parent = input.parent(), name = fm.escape(file.i18 || file.name); input.off(); if (tarea) { name = name.replace(/([_.])/g, '​$1'); } requestAnimationFrame(function() { if (navbar) { input.replaceWith(name); } else { if (parent.length) { input.remove(); parent.html(name); } else { target.find(filename).html(name); } } }); error && fm.error(error); }) .always(function() { rest(); fm.unbind('resize', resize); fm.enable(); }), blur = function(e) { var name = input.val().trim(), splits = fm.splitFileExtention(name), valid = true, req = function() { input.off(); rest(); if (navbar) { input.replaceWith(fm.escape(name)); } else { node.html(fm.escape(name)); } request(dfrd, sel, file, name); }; if (!overlay.is(':hidden')) { pnode.css('z-index', ''); } if (name === '') { if (!fm.isRoot(file)) { return cancel(); } if (navbar) { input.replaceWith(fm.escape(file.name)); } else { node.html(fm.escape(file.name)); } } if (!inError && pnode.length) { input.off('blur'); if (cnt === 1 && name === file.name) { return dfrd.reject(); } if (fm.options.validName && fm.options.validName.test) { try { valid = fm.options.validName.test(name); } catch(e) { valid = false; } } if (name === '.' || name === '..' || !valid) { inError = true; fm.error(file.mime === 'directory'? 'errInvDirname' : 'errInvName', {modal: true, close: function(){setTimeout(select, 120);}}); return false; } if (cnt === 1 && fm.fileByName(name, file.phash)) { inError = true; fm.error(['errExists', name], {modal: true, close: function(){setTimeout(select, 120);}}); return false; } if (cnt === 1) { req(); } else { fm.confirm({ title : 'cmdrename', text : ['renameMultiple', cnt, getHint(name, [file.hash].concat(sel))], accept : { label : 'btnYes', callback : req }, cancel : { label : 'btnCancel', callback : function() { setTimeout(function() { inError = true; select(); }, 120); } } }); setTimeout(function() { fm.trigger('unselectfiles', {files: fm.selected()}) .trigger('selectfiles', {files : [file.hash].concat(sel)}); }, 120); } } }, input = $(tarea? '' : '') .on('keyup text', function(){ if (tarea) { this.style.height = '1px'; this.style.height = this.scrollHeight + 'px'; } else if (colwidth) { this.style.width = colwidth + 'px'; if (this.scrollWidth > colwidth) { this.style.width = this.scrollWidth + 10 + 'px'; } } }) .on('keydown', function(e) { e.stopImmediatePropagation(); if (e.keyCode == $.ui.keyCode.ESCAPE) { dfrd.reject(); } else if (e.keyCode == $.ui.keyCode.ENTER) { e.preventDefault(); input.trigger('blur'); } }) .on('mousedown click dblclick', function(e) { e.stopPropagation(); if (e.type === 'dblclick') { e.preventDefault(); } }) .on('blur', blur) .on('dragenter dragleave dragover drop', function(e) { // stop bubbling to prevent upload with native drop event e.stopPropagation(); }), select = function() { var name = fm.splitFileExtention(input.val())[0]; if (!inError && fm.UA.Mobile && !fm.UA.iOS) { // since iOS has a bug? (z-index not effect) so disable it overlay.on('click close', cancel).elfinderoverlay('show'); pnode.css('z-index', overlay.css('z-index') + 1); } ! fm.enabled() && fm.enable(); if (inError) { inError = false; input.on('blur', blur); } input.trigger('focus').trigger('select'); input[0].setSelectionRange && input[0].setSelectionRange(0, name.length); }, node = navbar? target.contents().filter(function(){ return this.nodeType==3 && $(this).parent().attr('id') === fm.navHash2Id(file.hash); }) : target.find(filename), pnode = node.parent(), overlay = fm.getUI('overlay'), cancel = function(e) { if (!overlay.is(':hidden')) { pnode.css('z-index', ''); } if (! inError) { dfrd.reject(); if (e) { e.stopPropagation(); e.preventDefault(); } } }, resize = function() { target.trigger('scrolltoview', {blink : false}); }, inError = false; pnode.addClass('ui-front') .css('position', 'relative') .on('unselect.'+fm.namespace, unselect); fm.bind('resize', resize); if (navbar) { node.replaceWith(input.val(file.name)); } else { if (tarea) { node.css('max-height', 'none'); } else if (!navbar) { colwidth = pnode.width(); pnode.width(colwidth - 15) .parent('td').css('overflow', 'visible'); } node.empty().append(input.val(file.name)); } if (cnt > 1 && fm.api <= 2.1030) { return dfrd.reject(); } if (!file || !node.length) { return dfrd.reject('errCmdParams', this.title); } if (file.locked && (!fm.isRoot(file) || !enableRootRename)) { return dfrd.reject(['errLocked', file.name]); } fm.one('select', function() { input.parent().length && file && $.inArray(file.hash, fm.selected()) === -1 && input.trigger('blur'); }); input.trigger('keyup'); select(); return dfrd; }; fm.bind('select contextmenucreate closecontextmenu', function(e) { var sel = (e.data? (e.data.selected || e.data.targets) : null) || fm.selected(), file; if (sel && sel.length === 1 && (file = fm.file(sel[0])) && fm.isRoot(file)) { self.title = fm.i18n('kindAlias') + ' (' + fm.i18n('preference') + ')'; } else { self.title = fm.i18n('cmdrename'); } if (e.type !== 'closecontextmenu') { self.update(void(0), self.title); } else { requestAnimationFrame(function() { self.update(void(0), self.title); }); } }).remove(function(e) { var rootNames; if (e.data && e.data.removed && (rootNames = fm.storage('rootNames'))) { $.each(e.data.removed, function(i, h) { if (rootNames[h]) { delete rootNames[h]; } }); fm.storage('rootNames', rootNames); } }); }; /* * File: /js/commands/resize.js */ /** * @class elFinder command "resize" * Open dialog to resize image * * @author Dmitry (dio) Levashov * @author Alexey Sukhotin * @author Naoki Sawada * @author Sergio Jovani **/ elFinder.prototype.commands.resize = function() { "use strict"; var fm = this.fm, losslessRotate = 0, getBounceBox = function(w, h, theta) { var srcPts = [ {x: w/2, y: h/2}, {x: -w/2, y: h/2}, {x: -w/2, y: -h/2}, {x: w/2, y: -h/2} ], dstPts = [], min = {x: Number.MAX_VALUE, y: Number.MAX_VALUE}, max = {x: Number.MIN_VALUE, y: Number.MIN_VALUE}; $.each(srcPts, function(i, srcPt){ dstPts.push({ x: srcPt.x * Math.cos(theta) - srcPt.y * Math.sin(theta), y: srcPt.x * Math.sin(theta) + srcPt.y * Math.cos(theta) }); }); $.each(dstPts, function(i, pt) { min.x = Math.min(min.x, pt.x); min.y = Math.min(min.y, pt.y); max.x = Math.max(max.x, pt.x); max.y = Math.max(max.y, pt.y); }); return { width: max.x - min.x, height: max.y - min.y }; }; this.updateOnSelect = false; this.getstate = function() { var sel = fm.selectedFiles(); return sel.length == 1 && sel[0].read && sel[0].write && sel[0].mime.indexOf('image/') !== -1 ? 0 : -1; }; this.resizeRequest = function(data, f, dfrd) { var file = f || fm.file(data.target), tmb = file? file.tmb : null, enabled = fm.isCommandEnabled('resize', data.target); if (enabled && (! file || (file && file.read && file.write && file.mime.indexOf('image/') !== -1 ))) { return fm.request({ data : Object.assign(data, { cmd : 'resize' }), notify : {type : 'resize', cnt : 1} }) .fail(function(error) { if (dfrd) { dfrd.reject(error); } }) .done(function() { if (data.quality) { fm.storage('jpgQuality', data.quality === fm.option('jpgQuality')? null : data.quality); } dfrd && dfrd.resolve(); }); } else { var error; if (file) { if (file.mime.indexOf('image/') === -1) { error = ['errResize', file.name, 'errUsupportType']; } else { error = ['errResize', file.name, 'errPerm']; } } else { error = ['errResize', data.target, 'errPerm']; } if (dfrd) { dfrd.reject(error); } else { fm.error(error); } return $.Deferred().reject(error); } }; this.exec = function(hashes) { var self = this, files = this.files(hashes), dfrd = $.Deferred(), api2 = (fm.api > 1), options = this.options, dialogWidth = 650, fmnode = fm.getUI(), ctrgrup = $().controlgroup? 'controlgroup' : 'buttonset', grid8Def = typeof options.grid8px === 'undefined' || options.grid8px !== 'disable'? true : false, presetSize = Array.isArray(options.presetSize)? options.presetSize : [], clactive = 'elfinder-dialog-active', clsediting = fm.res('class', 'editing'), open = function(file, id, src) { var isJpeg = (file.mime === 'image/jpeg'), dialog = $('
            '), input = '', row = '
            ', label = '
            ', changeTm = null, operate = false, opStart = function() { operate = true; }, opStop = function() { if (operate) { operate = false; control.trigger('change'); } }, control = $('
            ') .on('focus', 'input[type=text],input[type=number]', function() { $(this).trigger('select'); }) .on('change', function() { changeTm && cancelAnimationFrame(changeTm); changeTm = requestAnimationFrame(function() { var panel, quty, canvas, ctx, img, sx, sy, sw, sh, deg, theta, bb; if (sizeImg && ! operate && (canvas = sizeImg.data('canvas'))) { panel = control.children('div.elfinder-resize-control-panel:visible'); quty = panel.find('input.elfinder-resize-quality'); if (quty.is(':visible')) { ctx = sizeImg.data('ctx'); img = sizeImg.get(0); if (panel.hasClass('elfinder-resize-uiresize')) { // resize sw = canvas.width = width.val(); sh = canvas.height = height.val(); ctx.drawImage(img, 0, 0, sw, sh); } else if (panel.hasClass('elfinder-resize-uicrop')) { // crop sx = pointX.val(); sy = pointY.val(); sw = offsetX.val(); sh = offsetY.val(); canvas.width = sw; canvas.height = sh; ctx.drawImage(img, sx, sy, sw, sh, 0, 0, sw, sh); } else { // rotate deg = degree.val(); theta = (degree.val() * Math.PI) / 180; bb = getBounceBox(owidth, oheight, theta); sw = canvas.width = bb.width; sh = canvas.height = bb.height; ctx.save(); if (deg % 90 !== 0) { ctx.fillStyle = bg.val() || '#FFF'; ctx.fillRect(0, 0, sw, sh); } ctx.translate(sw / 2, sh / 2); ctx.rotate(theta); ctx.drawImage(img, -img.width/2, -img.height/2, owidth, oheight); ctx.restore(); } canvas.toBlob(function(blob) { if (blob) { size1 = blob.size; quty.next('span').text(' (' + fm.formatSize(blob.size) + ')'); } }, 'image/jpeg', Math.max(Math.min(quty.val(), 100), 1) / 100); } } }); }) .on('mouseup', 'input', function(e) { $(e.target).trigger('change'); }), preview = $('
            ') .on('touchmove', function(e) { if ($(e.target).hasClass('touch-punch')) { e.stopPropagation(); e.preventDefault(); } }), spinner = $('
            '+fm.i18n('ntfloadimg')+'
            '), rhandle = $('
            '), rhandlec = $('
            '), uiresize = $('
            '), uicrop = $('
            '), uirotate = $('
            '), uideg270 = $('').attr('title',fm.i18n('rotate-cw')).append($('')), uideg90 = $('').attr('title',fm.i18n('rotate-ccw')).append($('')), uiprop = $(''), reset = $('') .on('mouseenter mouseleave', function(e) { $(this).toggleClass('ui-state-hover', e.type == 'mouseenter'); }).on('click', function() { fm.exec('open', check).done(function() { fm.one('opendone', function() { fm.trigger('selectfiles', {files : $.map(data.added, function(f) {return f.hash;})}); }); }); }) ); } else { fm.trigger('selectfiles', {files : $.map(data.added, function(f) {return f.hash;})}); } fm.toast({msg: fm.i18n(['complete', fm.i18n('cmdupload')]), extNode: node}); } } }) .progress(function() { dfrd.notifyWith(this, Array.from(arguments)); }); }, upload = function(data) { dialog.elfinderdialog('close'); if (targets) { data.target = targets[0]; } fmUpload(data); }, getSelector = function() { var hash = targetDir.hash, dirs = $.map(fm.files(hash), function(f) { return (f.mime === 'directory' && f.write)? f : null; }); if (! dirs.length) { return $(); } return $('
            ') .on('click', function(e) { e.stopPropagation(); e.preventDefault(); dirs = fm.sortFiles(dirs); var $this = $(this), cwd = fm.cwd(), base = dialog.closest('div.ui-dialog'), getRaw = function(f, icon) { return { label : fm.escape(f.i18 || f.name), icon : icon, remain : false, callback : function() { var title = base.children('.ui-dialog-titlebar:first').find('span.elfinder-upload-target'); targets = [ f.hash ]; title.html(' - ' + fm.escape(f.i18 || f.name)); $this.trigger('focus'); }, options : { className : (targets && targets.length && f.hash === targets[0])? 'ui-state-active' : '', iconClass : f.csscls || '', iconImg : f.icon || '' } }; }, raw = [ getRaw(targetDir, 'opendir'), '|' ]; $.each(dirs, function(i, f) { raw.push(getRaw(f, 'dir')); }); $this.trigger('blur'); fm.trigger('contextmenu', { raw: raw, x: e.pageX || $(this).offset().left, y: e.pageY || $(this).offset().top, prevNode: base, fitHeight: true }); }).append(''); }, inputButton = function(type, caption) { var button, input = $('') .on('click', function() { // for IE's bug if (fm.UA.IE) { setTimeout(function() { form.css('display', 'none').css('position', 'relative'); requestAnimationFrame(function() { form.css('display', '').css('position', ''); }); }, 100); } }) .on('change', function() { upload({input : input.get(0), type : 'files'}); }) .on('dragover', function(e) { e.originalEvent.dataTransfer.dropEffect = 'copy'; }), form = $('
            ').append(input).on('click', function(e) { e.stopPropagation(); }); return $('
            '+fm.i18n(caption)+'
            ') .append(form) .on('click', function(e) { e.stopPropagation(); e.preventDefault(); input.trigger('click'); }) .on('mouseenter mouseleave', function(e) { $(this).toggleClass(hover, e.type === 'mouseenter'); }); }, dfrd = $.Deferred(), dialog, dropbox, pastebox, dropUpload, paste, dirs, spinner, uidialog; dropUpload = function(e) { e.stopPropagation(); e.preventDefault(); var file = false, type = '', elfFrom = null, mycwd = '', data = null, target = e._target || null, trf = e.dataTransfer || null, kind = '', idx, errors; if (trf) { if (trf.types && trf.types.length) { if ((idx = $.inArray('application/x-moz-file', trf.types)) !== -1) { kind = 'file'; } else if ((idx = $.inArray('Files', trf.types)) !== -1) { kind = 'file'; } } else if (trf.items && trf.items.length && trf.items[0].kind) { kind = trf.items[0].kind; } try { elfFrom = trf.getData('elfinderfrom'); if (elfFrom) { mycwd = window.location.href + fm.cwd().hash; if ((!target && elfFrom === mycwd) || target === mycwd) { dfrd.reject(); return; } } } catch(e) {} if (kind === 'file' && (trf.items[idx].getAsEntry || trf.items[idx].webkitGetAsEntry || trf.items[idx].getAsFile)) { file = trf; type = 'data'; } else if (kind !== 'string' && trf.files && trf.files.length && $.inArray('Text', trf.types) === -1) { file = trf.files; type = 'files'; } else { try { if ((data = trf.getData('text/html')) && data.match(/<(?:img|a)/i)) { file = [ data ]; type = 'html'; } } catch(e) {} if (! file) { if (data = trf.getData('text')) { file = [ data ]; type = 'text'; } else if (trf && trf.files) { // maybe folder uploading but this UA dose not support it kind = 'file'; } } } } if (file) { fmUpload({files : file, type : type, target : target, dropEvt : e}); } else { errors = ['errUploadNoFiles']; if (kind === 'file') { errors.push('errFolderUpload'); } fm.error(errors); dfrd.reject(); } }; if (!targets && data) { if (data.input || data.files) { data.type = 'files'; fmUpload(data); } else if (data.dropEvt) { dropUpload(data.dropEvt); } return dfrd; } paste = function(ev) { var e = ev.originalEvent || ev; var files = [], items = []; var file; if (e.clipboardData) { if (e.clipboardData.items && e.clipboardData.items.length){ items = e.clipboardData.items; for (var i=0; i < items.length; i++) { if (e.clipboardData.items[i].kind == 'file') { file = e.clipboardData.items[i].getAsFile(); files.push(file); } } } else if (e.clipboardData.files && e.clipboardData.files.length) { files = e.clipboardData.files; } if (files.length) { upload({files : files, type : 'files', clipdata : true}); return; } } var my = e.target || e.srcElement; requestAnimationFrame(function() { var type = 'text', src; if (my.innerHTML) { $(my).find('img').each(function(i, v){ if (v.src.match(/^webkit-fake-url:\/\//)) { // For Safari's bug. // ref. https://bugs.webkit.org/show_bug.cgi?id=49141 // https://dev.ckeditor.com/ticket/13029 $(v).remove(); } }); if ($(my).find('a,img').length) { type = 'html'; } src = my.innerHTML; my.innerHTML = ''; upload({files : [ src ], type : type}); } }); }; dialog = $('
            ') .append(inputButton('multiple', 'selectForUpload')); if (! fm.UA.Mobile && (function(input) { return (typeof input.webkitdirectory !== 'undefined' || typeof input.directory !== 'undefined');})(document.createElement('input'))) { dialog.append(inputButton('multiple webkitdirectory directory', 'selectFolder')); } if (targetDir.dirs) { if (targetDir.hash === cwdHash || fm.navHash2Elm(targetDir.hash).hasClass('elfinder-subtree-loaded')) { getSelector().appendTo(dialog); } else { spinner = $('
            ') .append('') .appendTo(dialog); fm.request({cmd : 'tree', target : targetDir.hash}) .done(function() { fm.one('treedone', function() { spinner.replaceWith(getSelector()); uidialog.elfinderdialog('tabstopsInit'); }); }) .fail(function() { spinner.remove(); }); } } if (fm.dragUpload) { dropbox = $('
            ') .on('paste', function(e){ paste(e); }) .on('mousedown click', function(){ $(this).trigger('focus'); }) .on('focus', function(){ this.innerHTML = ''; }) .on('mouseover', function(){ $(this).addClass(hover); }) .on('mouseout', function(){ $(this).removeClass(hover); }) .on('dragenter', function(e) { e.stopPropagation(); e.preventDefault(); $(this).addClass(hover); }) .on('dragleave', function(e) { e.stopPropagation(); e.preventDefault(); $(this).removeClass(hover); }) .on('dragover', function(e) { e.stopPropagation(); e.preventDefault(); e.originalEvent.dataTransfer.dropEffect = 'copy'; $(this).addClass(hover); }) .on('drop', function(e) { dialog.elfinderdialog('close'); targets && (e.originalEvent._target = targets[0]); dropUpload(e.originalEvent); }) .prependTo(dialog) .after('
            '+fm.i18n('or')+'
            ')[0]; } else { pastebox = $('
            '+fm.i18n('dropFilesBrowser')+'
            ') .on('paste drop', function(e){ paste(e); }) .on('mousedown click', function(){ $(this).trigger('focus'); }) .on('focus', function(){ this.innerHTML = ''; }) .on('dragenter mouseover', function(){ $(this).addClass(hover); }) .on('dragleave mouseout', function(){ $(this).removeClass(hover); }) .prependTo(dialog) .after('
            '+fm.i18n('or')+'
            ')[0]; } uidialog = this.fmDialog(dialog, { title : this.title + '' + (targetDir? ' - ' + fm.escape(targetDir.i18 || targetDir.name) : '') + '', modal : true, resizable : false, destroyOnClose : true, propagationEvents : ['mousemove', 'mouseup', 'click'], close : function() { var cm = fm.getUI('contextmenu'); if (cm.is(':visible')) { cm.click(); } } }); return dfrd; }; }; /* * File: /js/commands/view.js */ /** * @class elFinder command "view" * Change current directory view (icons/list) * * @author Dmitry (dio) Levashov **/ elFinder.prototype.commands.view = function() { "use strict"; var self = this, fm = this.fm, subMenuRaw; this.value = fm.viewType; this.alwaysEnabled = true; this.updateOnSelect = false; this.options = { ui : 'viewbutton'}; this.getstate = function() { return 0; }; this.extra = { icon: 'menu', node: $('') .attr({title: fm.i18n('viewtype')}) .on('click touchstart', function(e){ if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) { return; } var node = $(this); e.stopPropagation(); e.preventDefault(); fm.trigger('contextmenu', { raw: getSubMenuRaw(), x: node.offset().left, y: node.offset().top }); }) }; this.exec = function() { var self = this, value = this.value == 'list' ? 'icons' : 'list'; fm.storage('view', value); return fm.lazy(function() { fm.viewchange(); self.update(void(0), value); this.resolve(); }); }; fm.bind('init', function() { subMenuRaw = (function() { var cwd = fm.getUI('cwd'), raws = [], sizeNames = fm.options.uiOptions.cwd.iconsView.sizeNames, max = fm.options.uiOptions.cwd.iconsView.sizeMax, i, size; for (i = 0; i <= max; i++) { raws.push( { label : fm.i18n(sizeNames[i] || ('Size-' + i + ' icons')), icon : 'view', callback : (function(s) { return function() { cwd.trigger('iconpref', {size: s}); fm.storage('iconsize', s); if (self.value === 'list') { self.exec(); } }; })(i) } ); } raws.push('|'); raws.push( { label : fm.i18n('viewlist'), icon : 'view-list', callback : function() { if (self.value !== 'list') { self.exec(); } } } ); return raws; })(); }).bind('contextmenucreate', function() { self.extra = { icon: 'menu', node: $('') .attr({title: fm.i18n('cmdview')}) .on('click touchstart', function(e){ if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) { return; } var node = $(this), raw = subMenuRaw.concat(), idx, i; if (self.value === 'list') { idx = subMenuRaw.length - 1; } else { idx = parseInt(fm.storage('iconsize') || 0); } for (i = 0; i < subMenuRaw.length; i++) { if (subMenuRaw[i] !== '|') { subMenuRaw[i].options = (i === idx? {'className': 'ui-state-active'} : void(0)) ; } } e.stopPropagation(); e.preventDefault(); fm.trigger('contextmenu', { raw: subMenuRaw, x: node.offset().left, y: node.offset().top }); }) }; }); }; return elFinder; }));/* contextmenu.css */ /* **Note** that the context menu is NOT inside the main elfinder div */ /* Context menu wrapper */ .elfinder-contextmenu, .elfinder-contextmenu-sub, .elfinder-button-menu { font-size: 16px; font-family: 'Open Sans', sans-serif; background: #fff!important; border: 1px solid #b5b5b5!important; box-shadow: 0 0 5px #cdcdcd!important; border-radius: 0; padding: 3px 3px 0 3px; } /* Menu item */ .elfinder-contextmenu .elfinder-contextmenu-item, .elfinder-button-menu .elfinder-button-menu-item { margin: 0 0 3px 0; } /* Hovered menu item */ .elfinder-contextmenu .elfinder-contextmenu-item:hover, .elfinder-button-menu .elfinder-button-menu-item:hover { background: #dedddc; color: #000; } /* Item icon */ .elfinder-contextmenu .elfinder-contextmenu-item .elfinder-contextmenu-icon { /* */ } /* Separator */ .elfinder-contextmenu .elfinder-contextmenu-separator { background: #e2e3e4; height: 1px; margin: 1px; } .elfinder-contextmenu .elfinder-button-icon-open + span { font-weight: bold; } .elfinder-contextmenu-sub .elfinder-contextmenu-item { padding: 4px 50px 4px 20px !important; } /* Context menu icons */ .elfinder-contextmenu-item .elfinder-button-icon-reload, .elfinder-contextmenu-item .elfinder-button-icon-fullscreen, .elfinder-contextmenu-item .elfinder-button-icon-edit, .elfinder-contextmenu-item .elfinder-button-icon-trash, .elfinder-contextmenu-item .elfinder-button-icon-unfullscreen, .elfinder-button-icon-restore, .elfinder-button-icon-opennew { width: 16px; height: 16px; display: inline-block; background: url(../../../img/toolbar.png) no-repeat; background-position-x: 0%; background-position-y: 0%; } .elfinder-contextmenu-item .elfinder-button-icon-open { background-image: url('../images/16px/open.png') !important; } .elfinder-contextmenu-item .elfinder-button-icon-download { background-image: url('../images/16px/download.png') !important; } .elfinder-contextmenu-item .elfinder-button-icon-quicklook { background-image: url('../images/16px/preview.png'); } .elfinder-contextmenu-item .elfinder-button-icon-upload { background-image: url('../images/16px/upload.png'); } .elfinder-contextmenu-item .elfinder-button-icon-copy { background-image: url('../images/16px/copy.png'); } .elfinder-contextmenu-item .elfinder-button-icon-paste { background-image: url('../images/16px/paste.png'); } .elfinder-contextmenu-item .elfinder-button-icon-cut { background-image: url('../images/16px/cut.png'); } .elfinder-contextmenu-item .elfinder-button-icon-duplicate { background-image: url('../images/16px/duplicate.png'); } .elfinder-contextmenu-item .elfinder-button-icon-mkdirin, .elfinder-contextmenu-item .elfinder-button-icon-mkdir { background-image: url('../images/16px/directory.png'); } .elfinder-contextmenu-item .elfinder-button-icon-empty { background-image: url('../images/16px/clear_folder.png'); } .elfinder-contextmenu-item .elfinder-button-icon-rename { background-image: url('../images/16px/rename.png'); } .elfinder-contextmenu-item .elfinder-button-icon-archive { background-image: url('../images/16px/archive.png'); } .elfinder-contextmenu-item .elfinder-button-icon-extract { background-image: url('../images/16px/extract.png'); } .elfinder-contextmenu-item .elfinder-button-icon-info { background-image: url('../images/16px/info.png'); } .elfinder-contextmenu-item .elfinder-button-icon-up{ background-image: url('../images/16px/undo.png'); } .elfinder-contextmenu-item .elfinder-button-icon-selectinvert { background-image: url('../images/16px/invert_selection.png'); } .elfinder-contextmenu-item .elfinder-button-icon-selectall { background-image: url('../images/16px/select_all.png'); } .elfinder-contextmenu-item .elfinder-button-icon-mkfile { background-image: url('../images/16px/file.png'); } .elfinder-contextmenu-item .elfinder-button-icon-view { background-image: url('../images/16px/view.png'); } .elfinder-contextmenu-item .elfinder-button-icon-view-list { background-image: url('../images/16px/view-list.png'); } .elfinder-contextmenu-item .elfinder-button-icon-sort { background-image: url('../images/16px/sort.png'); } .elfinder-contextmenu-item .elfinder-button-icon-rm { background-image: url('../images/16px/rm.png'); } .elfinder-contextmenu-item .elfinder-button-icon-hide { background-image: url('../images/16px/hide.png'); } .elfinder-contextmenu-item .elfinder-button-icon-unfullscreen { background-position: 0 -800px; } .elfinder-contextmenu-item .elfinder-button-icon-restore { background-position: 0 -816px; } .elfinder-contextmenu-item .elfinder-button-icon-opennew { background-position: 0 -976px; } .elfinder-contextmenu-item .elfinder-button-icon-fullscreen { background-position: 0 -784px; } .elfinder-contextmenu-item .elfinder-button-icon-trash { background-position: 0 -224px; } .elfinder-contextmenu-item .elfinder-button-icon-edit { background-position: 0 -336px; } .elfinder-contextmenu-item .elfinder-button-icon-reload { background-position: 0 -160px; }(()=>{"use strict";var l={2850(l,e,r){var o={};r.r(o),r.d(o,{Icon:()=>Z,accordion:()=>y,accordionHeading:()=>P,accordionItem:()=>S,addCard:()=>G,addSubmenu:()=>b,addTemplate:()=>_,alignCenter:()=>R,alignJustify:()=>W,alignLeft:()=>A,alignNone:()=>N,alignRight:()=>q,archive:()=>T,arrowDown:()=>O,arrowDownLeft:()=>D,arrowDownRight:()=>F,arrowLeft:()=>I,arrowRight:()=>U,arrowUp:()=>J,arrowUpLeft:()=>E,arrowUpRight:()=>$,aspectRatio:()=>X,atSymbol:()=>Q,audio:()=>Y,background:()=>K,backup:()=>ll,bell:()=>rl,bellUnread:()=>el,blockDefault:()=>ol,blockMeta:()=>tl,blockTable:()=>sl,border:()=>hl,box:()=>cl,breadcrumbs:()=>nl,brush:()=>il,bug:()=>xl,button:()=>vl,buttons:()=>wl,calendar:()=>al,cancelCircleFilled:()=>dl,caption:()=>ml,capturePhoto:()=>gl,captureVideo:()=>ul,cart:()=>jl,category:()=>Vl,caution:()=>pl,cautionFilled:()=>fl,chartBar:()=>Cl,check:()=>Hl,chevronDown:()=>zl,chevronDownSmall:()=>Ml,chevronLeft:()=>Ll,chevronLeftSmall:()=>kl,chevronRight:()=>Bl,chevronRightSmall:()=>Zl,chevronUp:()=>yl,chevronUpDown:()=>Pl,chevronUpSmall:()=>Sl,classic:()=>Gl,close:()=>_l,closeSmall:()=>bl,cloud:()=>Al,cloudDownload:()=>Rl,cloudUpload:()=>Wl,code:()=>Nl,cog:()=>ql,color:()=>Tl,column:()=>Dl,columns:()=>Fl,comment:()=>Jl,commentAuthorAvatar:()=>Ol,commentAuthorName:()=>Il,commentContent:()=>Ul,commentEditLink:()=>El,commentReplyLink:()=>$l,connection:()=>Xl,contents:()=>Ql,copy:()=>Kl,copySmall:()=>Yl,cornerAll:()=>le,cornerBottomLeft:()=>ee,cornerBottomRight:()=>re,cornerTopLeft:()=>oe,cornerTopRight:()=>te,cover:()=>se,create:()=>he,crop:()=>ce,currencyDollar:()=>ne,currencyEuro:()=>ie,currencyPound:()=>xe,customLink:()=>ve,customPostType:()=>we,dashboard:()=>ae,desktop:()=>de,details:()=>me,download:()=>ge,drafts:()=>ue,dragHandle:()=>je,drawerLeft:()=>Ve,drawerRight:()=>fe,envelope:()=>pe,error:()=>Ce,external:()=>He,file:()=>Me,filter:()=>ze,flipHorizontal:()=>ke,flipVertical:()=>Le,footer:()=>Ze,formatBold:()=>Be,formatCapitalize:()=>Pe,formatIndent:()=>ye,formatIndentRTL:()=>Se,formatItalic:()=>Ge,formatLTR:()=>Ne,formatListBullets:()=>_e,formatListBulletsRTL:()=>be,formatListNumbered:()=>We,formatListNumberedRTL:()=>Re,formatLowercase:()=>Ae,formatOutdent:()=>Te,formatOutdentRTL:()=>qe,formatRTL:()=>De,formatStrikethrough:()=>Fe,formatUnderline:()=>Oe,formatUppercase:()=>Ie,fullHeight:()=>Ue,fullscreen:()=>Ee,funnel:()=>$e,gallery:()=>Je,gift:()=>Xe,globe:()=>Qe,grid:()=>Ye,group:()=>Ke,handle:()=>lr,header:()=>er,heading:()=>nr,headingLevel1:()=>rr,headingLevel2:()=>or,headingLevel3:()=>tr,headingLevel4:()=>sr,headingLevel5:()=>hr,headingLevel6:()=>cr,help:()=>xr,helpFilled:()=>ir,home:()=>wr,homeButton:()=>vr,html:()=>ar,image:()=>dr,inbox:()=>mr,info:()=>gr,insertAfter:()=>ur,insertBefore:()=>jr,institution:()=>Vr,justifyBottom:()=>fr,justifyCenter:()=>Cr,justifyCenterVertical:()=>pr,justifyLeft:()=>Hr,justifyRight:()=>Mr,justifySpaceBetween:()=>kr,justifySpaceBetweenVertical:()=>zr,justifyStretch:()=>Zr,justifyStretchVertical:()=>Lr,justifyTop:()=>Br,key:()=>Pr,keyboard:()=>Gr,keyboardClose:()=>Sr,keyboardReturn:()=>yr,language:()=>br,layout:()=>_r,levelUp:()=>Rr,lifesaver:()=>Wr,lineDashed:()=>Ar,lineDotted:()=>Nr,lineSolid:()=>qr,link:()=>Dr,linkOff:()=>Tr,list:()=>Ir,listItem:()=>Fr,listView:()=>Or,lock:()=>$r,lockOutline:()=>Ur,lockSmall:()=>Er,login:()=>Jr,loop:()=>Xr,mapMarker:()=>Qr,math:()=>Yr,media:()=>lo,mediaAndText:()=>Kr,megaphone:()=>eo,menu:()=>ro,mobile:()=>oo,more:()=>ho,moreHorizontal:()=>to,moreVertical:()=>so,moveTo:()=>co,navigation:()=>io,navigationOverlay:()=>no,next:()=>xo,notAllowed:()=>vo,notFound:()=>wo,offline:()=>ao,overlayText:()=>mo,page:()=>uo,pageBreak:()=>go,pages:()=>jo,paragraph:()=>Vo,pause:()=>fo,payment:()=>po,pencil:()=>Co,pending:()=>Ho,people:()=>Mo,percent:()=>zo,pin:()=>Lo,pinSmall:()=>ko,play:()=>Zo,plugins:()=>Bo,plus:()=>yo,plusCircle:()=>So,plusCircleFilled:()=>Po,positionCenter:()=>Go,positionLeft:()=>bo,positionRight:()=>_o,post:()=>Eo,postAuthor:()=>Ro,postCategories:()=>Wo,postComments:()=>qo,postCommentsCount:()=>Ao,postCommentsForm:()=>No,postContent:()=>To,postDate:()=>Do,postExcerpt:()=>Fo,postFeaturedImage:()=>Oo,postList:()=>Io,postTerms:()=>Uo,preformatted:()=>$o,previous:()=>Jo,published:()=>Xo,pullLeft:()=>Qo,pullRight:()=>Yo,pullquote:()=>Ko,queryPagination:()=>ot,queryPaginationNext:()=>lt,queryPaginationNumbers:()=>et,queryPaginationPrevious:()=>rt,quote:()=>tt,receipt:()=>st,redo:()=>ht,removeBug:()=>ct,removeSubmenu:()=>nt,repeat:()=>it,replace:()=>xt,replay:()=>vt,reset:()=>wt,resizeCornerNE:()=>at,reusableBlock:()=>dt,rotateLeft:()=>mt,rotateRight:()=>gt,row:()=>ut,rss:()=>jt,scheduled:()=>Vt,search:()=>ft,seen:()=>pt,send:()=>Ct,separator:()=>Ht,settings:()=>Mt,shadow:()=>zt,share:()=>kt,shield:()=>Lt,shipping:()=>Zt,shortcode:()=>Bt,shuffle:()=>Pt,sidebar:()=>St,sidesAll:()=>yt,sidesAxial:()=>Gt,sidesBottom:()=>bt,sidesHorizontal:()=>_t,sidesLeft:()=>Rt,sidesRight:()=>Wt,sidesTop:()=>At,sidesVertical:()=>Nt,siteLogo:()=>qt,skipBack:()=>Tt,skipForward:()=>Dt,square:()=>Ft,stack:()=>Ot,starEmpty:()=>It,starFilled:()=>Ut,starHalf:()=>Et,store:()=>$t,stretchFullWidth:()=>Jt,stretchWide:()=>Xt,styles:()=>Qt,subscript:()=>Yt,superscript:()=>Kt,swatch:()=>ls,symbol:()=>rs,symbolFilled:()=>es,tabList:()=>os,tabPanel:()=>ts,table:()=>ws,tableColumnAfter:()=>ss,tableColumnBefore:()=>hs,tableColumnDelete:()=>cs,tableOfContents:()=>ns,tableRowAfter:()=>is,tableRowBefore:()=>xs,tableRowDelete:()=>vs,tablet:()=>as,tabs:()=>ds,tag:()=>ms,termCount:()=>gs,termDescription:()=>us,termName:()=>js,textColor:()=>Vs,textHorizontal:()=>fs,textVertical:()=>ps,thumbsDown:()=>Cs,thumbsUp:()=>Hs,time:()=>Ms,tip:()=>zs,title:()=>ks,tool:()=>Ls,trash:()=>Zs,trendingDown:()=>Bs,trendingUp:()=>Ps,typography:()=>Ss,undo:()=>ys,ungroup:()=>Gs,unlock:()=>bs,unseen:()=>_s,update:()=>Rs,upload:()=>Ws,verse:()=>As,video:()=>Ns,widget:()=>qs,wordCount:()=>Ts,wordpress:()=>Ds});const t=window.wp.blocks,s=JSON.parse('{"UU":"flexa/subscribe-form-date"}'),h=window.ReactJSXRuntime,c="#2563eb",n={container:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:c},grid:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"12",y1:"4",x2:"12",y2:"20",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:c},slides:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M3.5 9v6M20.5 9v6",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},slide:{src:(0,h.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,h.jsx)("rect",{x:"4",y:"6",width:"16",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})}),foreground:c},button:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"7",width:"18",height:"10",rx:"5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},heading:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M5 5v14M13 5v14M5 12h8",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("path",{d:"M17 10h3v9",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:c},image:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"8.5",cy:"9",r:"1.6",fill:"currentColor"}),(0,h.jsx)("path",{d:"M4 17l4.5-4.5 3.5 3.5 3-3L20 16.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:c},"before-after":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M12 3v18",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"12",cy:"12",r:"2.4",fill:"currentColor"}),(0,h.jsx)("path",{d:"M8 12H6M18 12h-2",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),foreground:c},countdown:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"12",cy:"13",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M12 9v4l2.5 2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,h.jsx)("line",{x1:"9",y1:"2.5",x2:"15",y2:"2.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},faq:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"4.5",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"3",y:"11.5",width:"18",height:"4.5",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M17.5 6.25h.01M17.5 13.75h.01",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),foreground:c},"social-icon":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"6",cy:"12",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"16.5",cy:"5.5",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"16.5",cy:"18.5",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M8.3 10.7l5.9-3.7M8.3 13.3l5.9 3.7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"social-share":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"18",cy:"5.5",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"6",cy:"12",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"18",cy:"18.5",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M8.3 10.7l7.4-4.2M8.3 13.3l7.4 4.2",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},text:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"4",y1:"10",x2:"20",y2:"10",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"4",y1:"14",x2:"14",y2:"14",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"4",y1:"18",x2:"17",y2:"18",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},separator:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("circle",{cx:"6",cy:"12",r:"0.6",fill:"currentColor"}),(0,h.jsx)("circle",{cx:"18",cy:"12",r:"0.6",fill:"currentColor"})]}),foreground:c},testimonial:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M4 4h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9l-4 4v-4H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,h.jsx)("path",{d:"m12 7 1.1 2.3 2.4.3-1.8 1.7.5 2.4-2.2-1.2-2.2 1.2.5-2.4L8.5 9.6l2.4-.3L12 7Z",fill:"currentColor"})]}),foreground:c},counter:{src:(0,h.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,h.jsx)("path",{d:"M4 20V10M12 20V4M20 20v-7",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})}),foreground:c},"info-box":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"8",cy:"9",r:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"12",y1:"8",x2:"18",y2:"8",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"6",y1:"14",x2:"18",y2:"14",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"6",y1:"17",x2:"15",y2:"17",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:c},"table-of-content":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("line",{x1:"4",y1:"6",x2:"6",y2:"6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"9",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"4",y1:"12",x2:"6",y2:"12",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"9",y1:"12",x2:"20",y2:"12",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"4",y1:"18",x2:"6",y2:"18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"9",y1:"18",x2:"20",y2:"18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),foreground:c},"comparison-table":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"9",y1:"9",x2:"9",y2:"20",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"15",y1:"9",x2:"15",y2:"20",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:c},breadcrumb:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M3 6h6M3 12h6M3 18h6",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("path",{d:"M13 7l3 5-3 5M18 7l3 5-3 5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:c},"video-popup":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M10 9.2v5.6l5-2.8z",fill:"currentColor"})]}),foreground:c},tabs:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M3 9h18",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"4.5",y:"6.2",width:"4.5",height:"1.6",rx:"0.8",fill:"currentColor"})]}),foreground:c},steps:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"6",cy:"6",r:"2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"6",cy:"18",r:"2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"6",y1:"8.5",x2:"6",y2:"15.5",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"11",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"11",y1:"18",x2:"20",y2:"18",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"google-map":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M12 21s6-5.2 6-10a6 6 0 1 0-12 0c0 4.8 6 10 6 10Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,h.jsx)("circle",{cx:"12",cy:"11",r:"2.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:c},"images-gallery":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"8",height:"8",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"13",y:"4",width:"8",height:"8",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"3",y:"14",width:"8",height:"6",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"13",y:"14",width:"8",height:"6",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:c},banner:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"7",y1:"10",x2:"17",y2:"10",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"9",y1:"13",x2:"15",y2:"13",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,h.jsx)("rect",{x:"9.5",y:"15.2",width:"5",height:"2.2",rx:"1.1",fill:"currentColor"})]}),foreground:c},cta:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("line",{x1:"6",y1:"7",x2:"18",y2:"7",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"8",y1:"10.5",x2:"16",y2:"10.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,h.jsx)("rect",{x:"7",y:"13.5",width:"10",height:"4.5",rx:"2.25",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"10",y1:"15.75",x2:"14",y2:"15.75",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"subscribe-form":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"7",y1:"9",x2:"17",y2:"9",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"7",y1:"12",x2:"14",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("rect",{x:"7",y:"15",width:"6",height:"2.6",rx:"1.3",fill:"currentColor"})]}),foreground:c},"subscribe-form-email":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M4 8l8 5 8-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:c},"subscribe-form-name":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"8",width:"18",height:"8",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"6",y1:"12",x2:"7",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"subscribe-form-phone":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"7",y:"3",width:"10",height:"18",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"10.5",y1:"18",x2:"13.5",y2:"18",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"subscribe-form-textarea":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"6",y1:"9",x2:"18",y2:"9",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"6",y1:"15",x2:"13",y2:"15",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"subscribe-form-select":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"7",width:"18",height:"10",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M14 11l2 2 2-2",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:c},"subscribe-form-radio":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"7",cy:"8",r:"2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"7",cy:"8",r:"0.9",fill:"currentColor"}),(0,h.jsx)("circle",{cx:"7",cy:"16",r:"2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"12",y1:"8",x2:"19",y2:"8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"12",y1:"16",x2:"19",y2:"16",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"subscribe-form-checkbox":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"4",y:"5.5",width:"6.5",height:"6.5",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M5.5 8.8l1.4 1.4 2.2-2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,h.jsx)("line",{x1:"13",y1:"8.5",x2:"20",y2:"8.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"4",y1:"16.5",x2:"20",y2:"16.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"subscribe-form-date":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"8",y1:"3",x2:"8",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"16",y1:"3",x2:"16",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("rect",{x:"7",y:"12",width:"3",height:"3",rx:"0.6",fill:"currentColor"})]}),foreground:c},"subscribe-form-url":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M10 14a3.5 3.5 0 0 0 5 0l2.5-2.5a3.5 3.5 0 0 0-5-5L11 8",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,h.jsx)("path",{d:"M14 10a3.5 3.5 0 0 0-5 0l-2.5 2.5a3.5 3.5 0 0 0 5 5L13 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:c},"subscribe-form-toggle":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"2",y:"7",width:"20",height:"10",rx:"5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"16",cy:"12",r:"3",fill:"currentColor"})]}),foreground:c},"subscribe-form-upload":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M12 15V5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("path",{d:"M8.5 8.5L12 5l3.5 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,h.jsx)("path",{d:"M5 15v3a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:c},"subscribe-form-hidden":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M3 12s3.5-6 9-6 9 6 9 6-3.5 6-9 6-9-6-9-6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,h.jsx)("circle",{cx:"12",cy:"12",r:"2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"pricing-table":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"5.5",height:"16",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"9.25",y:"4",width:"5.5",height:"16",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"15.5",y:"4",width:"5.5",height:"16",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"10.5",y1:"8",x2:"13.5",y2:"8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"team-member":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"12",cy:"8",r:"3.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M5.5 19a6.5 6.5 0 0 1 13 0",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"post-grid":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"8",height:"7",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"13",y:"4",width:"8",height:"7",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"3",y:"13",width:"8",height:"7",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"13",y:"13",width:"8",height:"7",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:c},"process-bar":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"9",width:"18",height:"6",rx:"3",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"5",y:"11",width:"9",height:"2",rx:"1",fill:"currentColor"})]}),foreground:c},timeline:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"21",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("circle",{cx:"12",cy:"7",r:"2.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"12",cy:"16",r:"2.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"14.5",y1:"7",x2:"20",y2:"7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"4",y1:"16",x2:"9.5",y2:"16",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},icon:{src:(0,h.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,h.jsx)("path",{d:"m12 3 2.6 5.6 6.1.7-4.5 4.1 1.2 6-5.4-3-5.4 3 1.2-6L3.3 9.3l6.1-.7L12 3Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})}),foreground:c},"icon-list":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"5",cy:"6",r:"1.8",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"5",cy:"12",r:"1.8",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"5",cy:"18",r:"1.8",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"10",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"10",y1:"18",x2:"16",y2:"18",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"star-rating":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"m6 8 .9 2 2.1.2-1.6 1.4.5 2.1L6 12.6 4.1 13.7l.5-2.1L3 10.2l2.1-.2L6 8Z",fill:"currentColor"}),(0,h.jsx)("path",{d:"m12 8 .9 2 2.1.2-1.6 1.4.5 2.1-1.9-1.1-1.9 1.1.5-2.1L9 10.2l2.1-.2L12 8Z",fill:"currentColor"}),(0,h.jsx)("path",{d:"m18 8 .9 2 2.1.2-1.6 1.4.5 2.1-1.9-1.1-1.9 1.1.5-2.1L15 10.2l2.1-.2L18 8Z",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})]}),foreground:c},modal:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.4"}),(0,h.jsx)("rect",{x:"6",y:"7",width:"12",height:"10",rx:"1.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"8.5",y1:"10.5",x2:"15.5",y2:"10.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"8.5",y1:"13.5",x2:"13",y2:"13.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),foreground:c},lottie:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M10 8.5v7l6-3.5-6-3.5Z",fill:"currentColor"})]}),foreground:c},notice:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"8.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"12",y1:"11",x2:"12",y2:"16",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"facebook-feed":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"3",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M14 8h-1.5c-.8 0-1.5.7-1.5 1.5V11H9.5v2H11v5h2v-5h1.6l.4-2H13V9.8c0-.4.2-.8.7-.8H14V8Z",fill:"currentColor"})]}),foreground:c},"instagram-feed":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3.5",y:"3.5",width:"17",height:"17",rx:"4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"12",cy:"12",r:"3.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("circle",{cx:"16.6",cy:"7.4",r:"1.1",fill:"currentColor"})]}),foreground:c},taxonomy:{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M4 5.5A1.5 1.5 0 0 1 5.5 4h6.7c.4 0 .8.16 1.06.44l6.3 6.3a1.5 1.5 0 0 1 0 2.12l-6.7 6.7a1.5 1.5 0 0 1-2.12 0l-6.3-6.3A1.5 1.5 0 0 1 4 12.2V5.5Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,h.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.3",fill:"currentColor"})]}),foreground:c},"data-table":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"9",y1:"9",x2:"9",y2:"20",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"3",y1:"14.5",x2:"21",y2:"14.5",stroke:"currentColor",strokeWidth:"1.4"})]}),foreground:c},"product-name":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{d:"M4 7h16",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("path",{d:"M4 12h11",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,h.jsx)("path",{d:"M4 17h7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:c},"product-price":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"12",cy:"12",r:"8.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M14.5 9.2c-.6-.8-1.6-1.2-2.6-1.2-1.5 0-2.6.9-2.6 2.1 0 2.9 5.4 1.6 5.4 4.4 0 1.3-1.2 2.2-2.8 2.2-1.1 0-2.2-.5-2.8-1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,h.jsx)("path",{d:"M12 6.2v11.6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),foreground:c},"product-rating":{src:(0,h.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,h.jsx)("path",{d:"M12 3.5l2.6 5.27 5.82.85-4.21 4.1.99 5.8L12 16.77 6.79 19.5l.99-5.8-4.21-4.1 5.82-.85L12 3.5z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})}),foreground:c},"product-detail":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("rect",{x:"3",y:"4",width:"7",height:"5",rx:"2",fill:"currentColor",opacity:"0.18",stroke:"none"}),(0,h.jsx)("line",{x1:"6",y1:"13",x2:"18",y2:"13",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,h.jsx)("line",{x1:"6",y1:"16.5",x2:"14",y2:"16.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),foreground:c},"product-image":{src:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("rect",{x:"3",y:"3.5",width:"18",height:"13",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,h.jsx)("path",{d:"M6 13.5l3.2-3.6 2.6 2.7 2.4-2.1 3.8 3.9",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,h.jsx)("circle",{cx:"9",cy:"7.5",r:"1.3",fill:"currentColor"}),(0,h.jsx)("rect",{x:"4",y:"19",width:"4.5",height:"2.5",rx:"0.8",fill:"currentColor",opacity:"0.5",stroke:"none"}),(0,h.jsx)("rect",{x:"9.8",y:"19",width:"4.5",height:"2.5",rx:"0.8",fill:"currentColor",opacity:"0.25",stroke:"none"}),(0,h.jsx)("rect",{x:"15.6",y:"19",width:"4.5",height:"2.5",rx:"0.8",fill:"currentColor",opacity:"0.25",stroke:"none"})]}),foreground:c}},i=window.wp.i18n,x=window.wp.element,v=window.wp.components,w=(l,e="0 0 24 24")=>(0,h.jsx)("svg",{width:"24",height:"24",viewBox:e,xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:l}),a=w((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("rect",{x:"3",y:"4",width:"18",height:"12",rx:"1.5"}),(0,h.jsx)("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),(0,h.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]})),d=w((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("rect",{x:"6",y:"3",width:"12",height:"18",rx:"1.5"}),(0,h.jsx)("line",{x1:"11",y1:"18",x2:"13",y2:"18"})]})),m=w((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("rect",{x:"8",y:"3",width:"8",height:"18",rx:"1.5"}),(0,h.jsx)("line",{x1:"11",y1:"18",x2:"13",y2:"18"})]}));w((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("line",{x1:"4",y1:"12",x2:"19",y2:"12"}),(0,h.jsx)("path",{d:"M14.5 7.5 L19 12 L14.5 16.5"})]})),w((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("line",{x1:"12",y1:"4",x2:"12",y2:"19"}),(0,h.jsx)("path",{d:"M7.5 14.5 L12 19 L16.5 14.5"})]})),w((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("path",{d:"M5 12a7 7 0 1 0 2-4.9"}),(0,h.jsx)("polyline",{points:"4 4 4 8 8 8"})]})),w((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("path",{d:"M10 13a3 3 0 0 0 4.2 0l2.3-2.3a3 3 0 0 0-4.2-4.2l-1 1"}),(0,h.jsx)("path",{d:"M14 11a3 3 0 0 0-4.2 0L7.5 13.3a3 3 0 0 0 4.2 4.2l1-1"})]})),w((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,h.jsx)("line",{x1:"12",y1:"2.5",x2:"12",y2:"5"}),(0,h.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"21.5"}),(0,h.jsx)("line",{x1:"2.5",y1:"12",x2:"5",y2:"12"}),(0,h.jsx)("line",{x1:"19",y1:"12",x2:"21.5",y2:"12"}),(0,h.jsx)("line",{x1:"5.3",y1:"5.3",x2:"7",y2:"7"}),(0,h.jsx)("line",{x1:"17",y1:"17",x2:"18.7",y2:"18.7"}),(0,h.jsx)("line",{x1:"5.3",y1:"18.7",x2:"7",y2:"17"}),(0,h.jsx)("line",{x1:"17",y1:"7",x2:"18.7",y2:"5.3"})]})),w((0,h.jsx)("path",{d:"M20 14.5A8 8 0 0 1 9.5 4a7 7 0 1 0 10.5 10.5z"}));[{value:"",label:"None"},{value:"solid",label:"Solid"},{value:"dashed",label:"Dashed"},{value:"dotted",label:"Dotted"},{value:"double",label:"Double"}].filter(l=>""!==l.value);const g=(...l)=>l.filter(Boolean).join(" "),u=window.wp.data,j=["core/edit-site","core/edit-post"],V=l=>l?"function"==typeof l.__experimentalGetPreviewDeviceType?l.__experimentalGetPreviewDeviceType():"function"==typeof l.getDeviceType?l.getDeviceType():null:null,f=l=>{const e=[...j,"core/editor"];for(const r of e)try{const e=(0,u.select)(r);if(!e)continue;const o=(0,u.dispatch)(r);if("function"==typeof e.__experimentalGetPreviewDeviceType&&o.__experimentalSetPreviewDeviceType)return void o.__experimentalSetPreviewDeviceType(l);if("function"==typeof e.getDeviceType&&o.setDeviceType)return void o.setDeviceType(l)}catch(l){}},p=l=>{switch(l){case"Tablet":return"tablet";case"Mobile":return"mobile";default:return"desktop"}},C=({label:l,value:e,options:r,onChange:o,isBlock:t=!0,responsive:s=!1})=>(0,h.jsxs)("div",{className:"flexa-field",children:[s&&(0,h.jsx)(k,{label:l}),(0,h.jsx)(v.__experimentalToggleGroupControl,{label:l,hideLabelFromVision:s,value:e,onChange:o,isBlock:t,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,children:r.map(l=>l.icon?(0,h.jsx)(v.__experimentalToggleGroupControlOptionIcon,{value:l.value,icon:(0,h.jsx)(v.Icon,{icon:l.icon}),label:l.label},l.value):(0,h.jsx)(v.__experimentalToggleGroupControlOption,{value:l.value,label:l.label},l.value))})]}),H=((0,i.__)("Light","flexa-block"),(0,i.__)("Dark","flexa-block"),{desktop:a,tablet:d,mobile:m}),M=[{key:"desktop",type:"Desktop",label:(0,i.__)("Desktop","flexa-block")},{key:"tablet",type:"Tablet",label:(0,i.__)("Tablet","flexa-block")},{key:"mobile",type:"Mobile",label:(0,i.__)("Mobile","flexa-block")}],z=()=>{const[l,e]=(()=>{const l=(0,u.useSelect)(l=>{for(const e of j)try{const r=V(l(e));if(r)return r}catch(l){}try{const e=V(l("core/editor"));if(e)return e}catch(l){}return"Desktop"},[]);return[p(l),f]})();return(0,h.jsx)(v.Dropdown,{className:"flexa-device-tag-wrap",contentClassName:"flexa-device-menu__popover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:r})=>(0,h.jsx)(v.Tooltip,{text:(0,i.__)("Responsive — choose device","flexa-block"),children:(0,h.jsx)("button",{type:"button",className:"flexa-device-tag"+("desktop"!==l?" is-active":""),"aria-expanded":e,"aria-label":(0,i.__)("Choose device","flexa-block"),onClick:r,children:(0,h.jsx)(v.Icon,{icon:H[l]})})}),renderContent:({onClose:r})=>(0,h.jsx)("div",{className:"flexa-device-menu",children:M.map(o=>(0,h.jsx)(v.Tooltip,{text:o.label,children:(0,h.jsx)("button",{type:"button",title:o.label,"aria-label":o.label,className:"flexa-device-menu__item"+(l===o.key?" is-active":""),onClick:()=>{e(o.type),r()},children:(0,h.jsx)(v.Icon,{icon:H[o.key]})})},o.key))})})},k=({label:l})=>(0,h.jsx)("div",{className:"flexa-field__head",children:(0,h.jsxs)("span",{className:"flexa-field__label",children:[l,(0,h.jsx)(z,{})]})});window.wp.apiFetch;const L=window.wp.blockEditor;(0,i.__)("Default","flexa-block"),(0,i.__)("Light (300)","flexa-block"),(0,i.__)("Normal (400)","flexa-block"),(0,i.__)("Medium (500)","flexa-block"),(0,i.__)("Semibold (600)","flexa-block"),(0,i.__)("Bold (700)","flexa-block"),(0,i.__)("Extra bold (800)","flexa-block"),(0,i.__)("Black (900)","flexa-block"),(0,i.__)("Default","flexa-block"),(0,i.__)("None","flexa-block"),(0,i.__)("Uppercase","flexa-block"),(0,i.__)("Lowercase","flexa-block"),(0,i.__)("Capitalize","flexa-block"),(0,i.__)("Normal","flexa-block"),(0,i.__)("Multiply","flexa-block"),(0,i.__)("Screen","flexa-block"),(0,i.__)("Overlay","flexa-block"),(0,i.__)("Darken","flexa-block"),(0,i.__)("Lighten","flexa-block"),(0,i.__)("Color Dodge","flexa-block"),(0,i.__)("Color Burn","flexa-block"),(0,i.__)("Hard Light","flexa-block"),(0,i.__)("Soft Light","flexa-block"),(0,i.__)("Difference","flexa-block"),(0,i.__)("Exclusion","flexa-block"),(0,i.__)("Left","flexa-block"),(0,i.__)("Center","flexa-block"),(0,i.__)("Right","flexa-block"),(0,i.__)("Justify","flexa-block"),(0,i.__)("Left","flexa-block"),(0,i.__)("Center","flexa-block"),(0,i.__)("Right","flexa-block"),(0,i.__)("Boxed","flexa-block"),(0,i.__)("Full Width","flexa-block"),(0,i.__)("Cover","flexa-block"),(0,i.__)("Contain","flexa-block"),(0,i.__)("Fill","flexa-block"),(0,i.__)("None","flexa-block"),(0,i.__)("Scale down","flexa-block"),(0,i.__)("Square 1:1","flexa-block"),(0,i.__)("Landscape 4:3","flexa-block"),(0,i.__)("Landscape 3:2","flexa-block"),(0,i.__)("Widescreen 16:9","flexa-block"),(0,i.__)("Cinema 21:9","flexa-block"),(0,i.__)("Portrait 3:4","flexa-block"),(0,i.__)("Portrait 2:3","flexa-block"),(0,i.__)("Portrait 9:16","flexa-block"),(0,i.__)("X offset","flexa-block"),(0,i.__)("Y offset","flexa-block"),(0,i.__)("Blur","flexa-block"),(0,i.__)("Spread","flexa-block"),(0,i.__)("None","flexa-block"),(0,i.__)("Fade In","flexa-block"),(0,i.__)("Fade In Up","flexa-block"),(0,i.__)("Fade In Down","flexa-block"),(0,i.__)("Fade In Left","flexa-block"),(0,i.__)("Fade In Right","flexa-block"),(0,i.__)("Zoom In","flexa-block"),(0,i.__)("Scale In","flexa-block"),(0,i.__)("Blur In","flexa-block"),(0,i.__)("Bounce In","flexa-block"),(0,i.__)("Bounce In Up","flexa-block"),(0,i.__)("Bounce In Down","flexa-block"),(0,i.__)("Bounce In Left","flexa-block"),(0,i.__)("Bounce In Right","flexa-block"),(0,i.__)("Flip In X","flexa-block"),(0,i.__)("Flip In Y","flexa-block"),(0,i.__)("Slow","flexa-block"),(0,i.__)("Normal","flexa-block"),(0,i.__)("Fast","flexa-block"),(0,i.__)("None","flexa-block"),(0,i.__)("Numbered pages","flexa-block"),(0,i.__)("Load more button","flexa-block");var Z=(0,x.forwardRef)(({icon:l,size:e=24,...r},o)=>(0,x.cloneElement)(l,{width:e,height:e,...r,ref:o}));const B=window.wp.primitives;var P=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z"}),(0,h.jsx)(B.Path,{d:"M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z"})]}),S=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z"}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z"}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z"}),(0,h.jsx)(B.Path,{d:"M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z"})]}),y=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z"}),(0,h.jsx)(B.Path,{d:"M4.5 6L8.5 8.5L4.5 11L4.5 6Z"}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z"}),(0,h.jsx)(B.Path,{d:"M4.5 13L8.5 15.5L4.5 18L4.5 13Z"})]}),G=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.5 5.5V8H20V5.5h2.5V4H20V1.5h-1.5V4H16v1.5h2.5zM12 4H6a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2v-6h-1.5v6a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5h6V4z"})}),b=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})}),_=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})}),R=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),W=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})}),A=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),N=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),q=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),T=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})}),D=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14 18H6V10H7.5V15.5L17 6L18 7L8.5 16.5H14V18Z"})}),F=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10 18h8v-8h-1.5v5.5L7 6 6 7l9.5 9.5H10V18Z"})}),O=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})}),I=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),U=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),E=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})}),$=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10 6H18V14H16.5V8.5L7 18L6 17L15.5 7.5H10V6Z"})}),J=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})}),X=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"})}),Q=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12.5939 21C14.1472 21 16.1269 20.5701 17.0711 20.1975L16.6447 18.879C16.0964 19.051 14.3299 19.6242 12.6548 19.6242C7.4467 19.6242 4.67513 16.8726 4.67513 12C4.67513 7.21338 7.50762 4.34713 12.2893 4.34713C17.132 4.34713 19.4162 7.55732 19.4162 10.7675C19.4162 14.035 19.0508 15.4968 17.4975 15.4968C16.5838 15.4968 16.0964 14.7803 16.0964 13.9777V7.5H14.4822V8.30255H14.3909C14.1777 7.67198 12.9898 7.12739 11.467 7.2707C9.18274 7.5 7.4467 9.27707 7.4467 11.8567C7.4467 14.5796 8.81726 16.672 11.467 16.758C13.203 16.8153 14.1168 16.0127 14.4822 15.1815H14.5736C14.7563 16.414 16.401 16.8439 17.467 16.8439C20.6954 16.8439 21 13.5764 21 10.7962C21 6.86943 18.0761 3 12.3807 3C6.50254 3 3 6.3535 3 11.9427C3 17.7325 6.38071 21 12.5939 21ZM11.7107 15.2962C9.73096 15.2962 9.03046 13.6051 9.03046 11.7707C9.03046 10.1083 10.0355 8.67516 11.7716 8.67516C13.599 8.67516 14.5736 9.36306 14.5736 11.7707C14.5736 14.1497 13.7513 15.2962 11.7107 15.2962Z"})}),Y=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})}),K=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})}),ll=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M13.75 4.194a8 8 0 0 0-4.812.415l-.301.132a8 8 0 0 0-3.203 2.692L4 6.001v4h4L6.517 8.516q.333-.526.758-.977l.011-.012q.341-.359.733-.662l.025-.02a6.5 6.5 0 0 1 2.469-1.172l.034-.008q.117-.027.236-.05l.015-.002q.32-.06.65-.088.08-.008.16-.013a7 7 0 0 1 .323-.01L12 5.5h.05l.203.005.101.003q.146.008.293.023l.12.014.158.02q.103.015.205.033l.058.011q.107.02.212.043l.068.016a6.5 6.5 0 0 1 1.447.521l.02.01a7 7 0 0 1 .452.25l.02.014a7 7 0 0 1 .468.317l.07.054a7 7 0 0 1 .403.334l.034.03q.091.084.18.172l.047.045q.293.294.548.627l.03.038.07.097.096.135q.037.053.072.107a6 6 0 0 1 .167.265l.042.073q.236.411.413.857l.027.07a6.5 6.5 0 0 1 .418 2.014 6.6 6.6 0 0 1-.034 1.04 6 6 0 0 1-.063.424q-.109.597-.32 1.152-.016.034-.028.07a6.5 6.5 0 0 1-.413.856l-.042.073a6 6 0 0 1-.327.497l-.087.118-.02.028a7 7 0 0 1-.526.604l-.035.035-.035.032q-.089.088-.18.172l-.034.03a7 7 0 0 1-.38.317l-.093.071q-.09.067-.183.13l-.076.053q-.112.076-.227.146-.218.133-.446.247l-.028.015-.192.093-.081.036a6.5 6.5 0 0 1-1.184.396l-.058.012a7 7 0 0 1-.475.087q-.08.012-.157.02l-.122.014q-.145.015-.292.023l-.136.005-.139.003L12 18.5q-.053-.002-.104-.003l-.127-.004-.162-.007q-.08-.005-.159-.013a7 7 0 0 1-.65-.088q-.008 0-.015-.002a7 7 0 0 1-.236-.05l-.034-.008a6.5 6.5 0 0 1-4.14-3.077l-1.3.75a8 8 0 0 0 3.564 3.26l.301.131a8 8 0 0 0 11.055-7.061l.007-.33c0-1.76-.581-3.473-1.653-4.87l-.206-.256a8 8 0 0 0-4.07-2.6zM12 7.75a.75.75 0 0 0-.75.75V12a.75.75 0 0 0 .218.529l1.282-.839-1.28.84 2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.28-2.28V8.5a.75.75 0 0 0-.75-.75"})}),el=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"M13.969 4.39A5.088 5.088 0 0 0 12 4C9.2 4 7 6.2 7 9v2.5c0 1.353-.17 2.368-.976 3-.267.209-.602.376-1.024.5v1h14v-1c-.422-.124-.757-.291-1.024-.5-.806-.632-.976-1.647-.976-3V11c-.53 0-1.037-.103-1.5-.29v.79c0 .93.066 1.98.515 2.897l.053.103H7.932l.053-.103c.449-.917.515-1.967.515-2.897V9c0-1.972 1.528-3.5 3.5-3.5.43 0 .838.072 1.214.206.167-.488.425-.933.755-1.316Zm-3.961 13.618c0-.176.023-.346.065-.508h3.854A1.996 1.996 0 0 1 12 20a1.991 1.991 0 0 1-1.992-1.992Z"}),(0,h.jsx)(B.Circle,{cx:"17",cy:"7",r:"2.5"})]}),rl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M17 11.5c0 1.353.17 2.368.976 3 .266.209.602.376 1.024.5v1H5v-1c.422-.124.757-.291 1.024-.5.806-.632.976-1.647.976-3V9c0-2.8 2.2-5 5-5s5 2.2 5 5v2.5ZM15.5 9v2.5c0 .93.066 1.98.515 2.897l.053.103H7.932a4.018 4.018 0 0 0 .053-.103c.449-.917.515-1.967.515-2.897V9c0-1.972 1.528-3.5 3.5-3.5s3.5 1.528 3.5 3.5Zm-5.492 9.008c0-.176.023-.346.065-.508h3.854A1.996 1.996 0 0 1 12 20c-1.1 0-1.992-.892-1.992-1.992Z"})}),ol=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})}),tl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",d:"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",clipRule:"evenodd"})}),sl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})}),hl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m6.6 15.6-1.2.8c.6.9 1.3 1.6 2.2 2.2l.8-1.2c-.7-.5-1.3-1.1-1.8-1.8zM5.5 12c0-.4 0-.9.1-1.3l-1.5-.3c0 .5-.1 1.1-.1 1.6s.1 1.1.2 1.6l1.5-.3c-.2-.4-.2-.9-.2-1.3zm11.9-3.6 1.2-.8c-.6-.9-1.3-1.6-2.2-2.2l-.8 1.2c.7.5 1.3 1.1 1.8 1.8zM5.3 7.6l1.2.8c.5-.7 1.1-1.3 1.8-1.8l-.7-1.3c-.9.6-1.7 1.4-2.3 2.3zm14.5 2.8-1.5.3c.1.4.1.8.1 1.3s0 .9-.1 1.3l1.5.3c.1-.5.2-1 .2-1.6s-.1-1.1-.2-1.6zM12 18.5c-.4 0-.9 0-1.3-.1l-.3 1.5c.5.1 1 .2 1.6.2s1.1-.1 1.6-.2l-.3-1.5c-.4.1-.9.1-1.3.1zm3.6-1.1.8 1.2c.9-.6 1.6-1.3 2.2-2.2l-1.2-.8c-.5.7-1.1 1.3-1.8 1.8zM10.4 4.2l.3 1.5c.4-.1.8-.1 1.3-.1s.9 0 1.3.1l.3-1.5c-.5-.1-1.1-.2-1.6-.2s-1.1.1-1.6.2z"})}),cl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z"})}),nl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z"})}),il=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})}),xl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.13 5.5l1.926 1.927A4.975 4.975 0 007.025 10H5v1.5h2V13H5v1.5h2.1a5.002 5.002 0 009.8 0H19V13h-2v-1.5h2V10h-2.025a4.979 4.979 0 00-1.167-2.74l1.76-1.76-1.061-1.06-1.834 1.834A4.977 4.977 0 0012 5.5c-1.062 0-2.046.33-2.855.895L7.19 4.44 6.13 5.5zm2.37 5v3a3.5 3.5 0 107 0v-3a3.5 3.5 0 10-7 0z"})}),vl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})}),wl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"})}),al=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})}),dl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm3.8 10.7-1.1 1.1-2.7-2.7-2.7 2.7-1.1-1.1 2.7-2.7-2.7-2.7 1.1-1.1 2.7 2.7 2.7-2.7 1.1 1.1-2.7 2.7 2.7 2.7Z"})}),ml=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})}),gl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 9.2c-2.2 0-3.9 1.8-3.9 4s1.8 4 3.9 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.4-1.1-2.4-2.5s1.1-2.5 2.4-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM20.2 8c-.1 0-.3 0-.5-.1l-2.5-.8c-.4-.1-.8-.4-1.1-.8l-1-1.5c-.4-.5-1-.9-1.7-.9h-2.9c-.6.1-1.2.4-1.6 1l-1 1.5c-.3.3-.6.6-1.1.7l-2.5.8c-.2.1-.4.1-.6.1-1 .2-1.7.9-1.7 1.9v8.3c0 1 .9 1.9 2 1.9h16c1.1 0 2-.8 2-1.9V9.9c0-1-.7-1.7-1.8-1.9zm.3 10.1c0 .2-.2.4-.5.4H4c-.3 0-.5-.2-.5-.4V9.9c0-.1.2-.3.5-.4.2 0 .5-.1.8-.2l2.5-.8c.7-.2 1.4-.6 1.8-1.3l1-1.5c.1-.1.2-.2.4-.2h2.9c.2 0 .3.1.4.2l1 1.5c.4.7 1.1 1.1 1.9 1.4l2.5.8c.3.1.6.1.8.2.3 0 .4.2.4.4v8.1z"})}),ul=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14 5H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v10zm2.5-7v4l5 3V7l-5 3zm3.5 4.4l-2-1.2v-2.3l2-1.2v4.7z"})}),jl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M8.5 17c-.8 0-1.5.7-1.5 1.5S7.7 20 8.5 20s1.5-.7 1.5-1.5S9.3 17 8.5 17Zm7 0c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5 1.5-.7 1.5-1.5-.7-1.5-1.5-1.5Zm-6-3.8h5.1c1.2 0 2.2-.7 2.6-1.8l1.3-3.5c.3-.8-.3-1.7-1.2-1.7h-10l-.8-2h-3v1.5h2l2.7 6.7-.6 1.3c-.6 1.2.3 2.5 1.6 2.5h8.4v-1.5H9.2c-.2 0-.3-.2-.2-.4l.6-1.1ZM7.9 7.8h9L15.7 11c-.2.5-.6.8-1.2.8H9.4l-1.6-4Z"})}),Vl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z"})}),fl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12.75 8V13H11.25V8H12.75ZM12.75 14.5V16H11.25V14.5H12.75Z"})}),pl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})}),Cl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z"})}),Hl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})}),Ml=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m15.99 10.889-3.988 3.418-3.988-3.418.976-1.14 3.012 2.582 3.012-2.581.976 1.139Z"})}),zl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),kl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Ll=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),Zl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),Bl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),Pl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z"})}),Sl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m15.99 13.167-3.988-3.418-3.988 3.418.976 1.14 3.012-2.582 3.012 2.581.976-1.139Z"})}),yl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Gl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"})}),bl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),_l=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),Rl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.3 10.1002C17.3 7.6002 15.2 5.7002 12.5 5.7002C10.3 5.7002 8.4 7.1002 7.9 9.0002H7.7C5.7 9.0002 4 10.7002 4 12.8002C4 14.9002 5.7 16.6002 7.7 16.6002V15.2002C6.5 15.2002 5.5 14.1002 5.5 12.9002C5.5 11.7002 6.5 10.5002 7.7 10.5002H9L9.3 9.4002C9.7 8.1002 11 7.2002 12.5 7.2002C14.3 7.2002 15.8 8.5002 15.8 10.1002V11.4002L17.1 11.6002C17.9 11.7002 18.5 12.5002 18.5 13.4002C18.5 14.4002 17.7 15.2002 16.8 15.2002H16.5V16.6002H16.7C18.5 16.6002 19.9 15.1002 19.9 13.3002C20 11.7002 18.8 10.4002 17.3 10.1002Z M9.8806 13.7576L8.81995 14.8182L12.0019 18.0002L15.1851 14.8171L14.1244 13.7564L12.7551 15.1257L12.7551 10.0002L11.2551 10.0002V15.1321L9.8806 13.7576Z"})}),Wl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z"})}),Al=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})}),Nl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})}),ql=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z"})}),Tl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})}),Dl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"})}),Fl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"})}),Ol=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})}),Il=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15"}),(0,h.jsx)(B.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"})]}),Ul=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})}),El=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"})}),$l=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z"})}),Jl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})}),Xl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19.53 4.47a.75.75 0 0 1 0 1.06L17.06 8l.77.769a3.155 3.155 0 0 1 .685 3.439 3.15 3.15 0 0 1-.685 1.022v.001L13.23 17.83v.001a3.15 3.15 0 0 1-4.462 0L8 17.06l-2.47 2.47a.75.75 0 0 1-1.06-1.06L6.94 16l-.77-.769a3.154 3.154 0 0 1-.685-3.439 3.15 3.15 0 0 1 .685-1.023l4.599-4.598a3.152 3.152 0 0 1 4.462 0l.769.768 2.47-2.47a.75.75 0 0 1 1.06 0Zm-2.76 7.7L15 13.94 10.06 9l1.771-1.77a1.65 1.65 0 0 1 2.338 0L16.77 9.83a1.649 1.649 0 0 1 0 2.338h-.001ZM13.94 15 9 10.06l-1.77 1.771a1.65 1.65 0 0 0 0 2.338l2.601 2.602a1.649 1.649 0 0 0 2.338 0v-.001L13.94 15Z"})}),Ql=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z"})}),Yl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})}),Kl=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})}),le=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),ee=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.G,{opacity:".25",children:(0,h.jsx)(B.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z"})]}),re=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.G,{opacity:".25",children:(0,h.jsx)(B.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z"})]}),oe=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.G,{opacity:".25",children:(0,h.jsx)(B.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]}),te=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.G,{opacity:".25",children:(0,h.jsx)(B.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z"})]}),se=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})}),he=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M16 11.2h-3.2V8h-1.6v3.2H8v1.6h3.2V16h1.6v-3.2H16z"})}),ce=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z"})}),ne=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10.7 9.6c.3-.2.8-.4 1.3-.4s1 .2 1.3.4c.3.2.4.5.4.6 0 .4.3.8.8.8s.8-.3.8-.8c0-.8-.5-1.4-1.1-1.9-.4-.3-.9-.5-1.4-.6v-.3c0-.4-.3-.8-.8-.8s-.8.3-.8.8v.3c-.5 0-1 .3-1.4.6-.6.4-1.1 1.1-1.1 1.9s.5 1.4 1.1 1.9c.6.4 1.4.6 2.2.6h.2c.5 0 .9.2 1.1.4.3.2.4.5.4.6s0 .4-.4.6c-.3.2-.8.4-1.3.4s-1-.2-1.3-.4c-.3-.2-.4-.5-.4-.6 0-.4-.3-.8-.8-.8s-.8.3-.8.8c0 .8.5 1.4 1.1 1.9.4.3.9.5 1.4.6v.3c0 .4.3.8.8.8s.8-.3.8-.8v-.3c.5 0 1-.3 1.4-.6.6-.4 1.1-1.1 1.1-1.9s-.5-1.4-1.1-1.9c-.5-.4-1.2-.6-1.9-.6H12c-.6 0-1-.2-1.3-.4-.3-.2-.4-.5-.4-.6s0-.4.4-.6ZM12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5Z"})}),ie=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11.9 9.3c.4 0 .8 0 1.1.2.4.1.7.3 1 .6.1.1.3.2.5.2s.4 0 .5-.2c.1-.1.2-.3.2-.5s0-.4-.2-.5c-.5-.5-1.1-.8-1.7-1.1-.7-.2-1.4-.2-2-.1-.7.1-1.3.4-1.9.8-.5.4-1 1-1.3 1.6h-.6c-.2 0-.4 0-.5.2-.1.1-.2.3-.2.5s0 .4.2.5c.1.1.3.2.5.2h.3v.5h-.3c-.2 0-.4 0-.5.2-.1.1-.2.3-.2.5s0 .4.2.5c.1.1.3.2.5.2h.6c.3.6.7 1.2 1.3 1.6.5.4 1.2.7 1.9.8.7.1 1.4 0 2-.1.7-.2 1.3-.6 1.7-1.1.1-.1.2-.3.2-.5s0-.4-.2-.5-.3-.2-.5-.2-.4 0-.5.2c-.3.3-.6.5-1 .6-.4.1-.7.2-1.1.2-.4 0-.8-.1-1.1-.3-.3-.2-.6-.4-.9-.7h.6c.2 0 .4 0 .5-.2.1-.1.2-.3.2-.5s0-.4-.2-.5c-.1-.1-.3-.2-.5-.2H9.3v-.5h2.2c.2 0 .4 0 .5-.2.1-.1.2-.3.2-.5s0-.4-.2-.5c-.1-.1-.3-.2-.5-.2H9.9c.2-.3.5-.5.9-.7s.7-.3 1.1-.3ZM12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5Z"})}),xe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",d:"M14.4 14.5H11c.3-.4.5-1 .5-1.6v-.1h1c.2 0 .4 0 .5-.2.1-.1.2-.3.2-.5s0-.4-.2-.5c-.1-.1-.3-.2-.5-.2h-1.3c0-.1-.1-.3-.2-.4 0-.1-.1-.2-.1-.4v-.3c0-.8.6-1.4 1.4-1.4s.6 0 .8.2c.2.2.4.4.5.6 0 .2.2.3.4.4h.6c.2 0 .3-.2.4-.4v-.6c-.3-.6-.7-1.2-1.3-1.5-.6-.3-1.3-.4-2-.3s-1.3.5-1.7 1c-.4.5-.7 1.2-.7 1.9 0 .3 0 .5.2.8 0 0 0 .2.1.3-.2 0-.4 0-.5.2-.1.1-.2.3-.2.5s0 .4.2.5c.1.1.3.2.5.2h.5v.1c0 .4-.2.8-.5 1.2l-.6.6c-.1 0-.2.2-.3.4v.5c0 .1.1.3.3.4.1 0 .3.1.4.1h5.1c.2 0 .4 0 .5-.2.1-.1.2-.3.2-.5s0-.4-.2-.5c-.1-.1-.3-.2-.5-.2ZM12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5Z"})}),ve=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})}),we=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})}),ae=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 5a8 8 0 0 1 3.842.984L14.726 7.1a6.502 6.502 0 0 0-7.323 1.303 6.5 6.5 0 0 0 0 9.194l-1.06 1.06A8 8 0 0 1 12 5Zm7.021 4.168a8 8 0 0 1-1.364 9.49l-1.06-1.061a6.5 6.5 0 0 0 1.307-7.312l1.117-1.117ZM17.47 6.47a.75.75 0 1 1 1.06 1.06l-5.083 5.082a1.5 1.5 0 1 1-1.06-1.06L17.47 6.47Z"})}),de=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})}),me=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",fillRule:"evenodd",clipRule:"evenodd"}),(0,h.jsx)(B.Path,{d:"m4 5.25 4 2.5-4 2.5v-5Z"})]}),ge=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})}),ue=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})}),je=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})}),Ve=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})}),fe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})}),pe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})}),Ce=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})}),He=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),Me=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})}),ze=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})}),ke=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 6v12c0 1.1.9 2 2 2h3v-1.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h3V4H6c-1.1 0-2 .9-2 2zm7.2 16h1.5V2h-1.5v20zM15 5.5h1.5V4H15v1.5zm3.5.5H20c0-1.1-.9-2-2-2v1.5c.3 0 .5.2.5.5zm0 10.5H20v-2h-1.5v2zm0-3.5H20v-2h-1.5v2zm-.5 5.5V20c1.1 0 2-.9 2-2h-1.5c0 .3-.2.5-.5.5zM15 20h1.5v-1.5H15V20zm3.5-10.5H20v-2h-1.5v2z"})}),Le=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M2 11.2v1.5h20v-1.5H2zM5.5 6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v3H20V6c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v3h1.5V6zm2 14h2v-1.5h-2V20zm3.5 0h2v-1.5h-2V20zm7-1.5V20c1.1 0 2-.9 2-2h-1.5c0 .3-.2.5-.5.5zm.5-2H20V15h-1.5v1.5zM5.5 18H4c0 1.1.9 2 2 2v-1.5c-.3 0-.5-.2-.5-.5zm0-3H4v1.5h1.5V15zm9 5h2v-1.5h-2V20z"})}),Ze=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),Be=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"})}),Pe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})}),Se=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})}),ye=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"})}),Ge=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"})}),be=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),_e=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Re=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})}),We=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})}),Ae=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})}),Ne=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z"})}),qe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})}),Te=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})}),De=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm19.3 0-1.1-1-3.4 4 3.4 4 1.1-1-2.6-3 2.6-3Z"})}),Fe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})}),Oe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})}),Ie=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})}),Ue=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12.75 19.45 15 17.5l1 1.1-4 3.4-4-3.4 1-1.1 2.25 1.95V14.5h1.5v4.95ZM19 12.75H5v-1.5h14v1.5ZM16 5.4l-1 1.1-2.25-1.95V9.5h-1.5V4.55L9 6.5 8 5.4 12 2l4 3.4Z"})}),Ee=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})}),$e=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})}),Je=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})}),Xe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M15.333 4C16.6677 4 17.75 5.0823 17.75 6.41699V6.75C17.75 7.20058 17.6394 7.62468 17.4473 8H18.5C19.2767 8 19.9154 8.59028 19.9922 9.34668L20 9.5V18.5C20 19.3284 19.3284 20 18.5 20H5.5C4.72334 20 4.08461 19.4097 4.00781 18.6533L4 18.5V9.5L4.00781 9.34668C4.07949 8.64069 4.64069 8.07949 5.34668 8.00781L5.5 8H6.55273C6.36065 7.62468 6.25 7.20058 6.25 6.75V6.41699C6.25 5.0823 7.3323 4 8.66699 4C10.0436 4.00011 11.2604 4.68183 12 5.72559C12.7396 4.68183 13.9564 4.00011 15.333 4ZM5.5 18.5H11.25V9.5H5.5V18.5ZM12.75 18.5H18.5V9.5H12.75V18.5ZM8.66699 5.5C8.16073 5.5 7.75 5.91073 7.75 6.41699V6.75C7.75 7.44036 8.30964 8 9 8H11.2461C11.2021 6.61198 10.0657 5.50017 8.66699 5.5ZM15.333 5.5C13.9343 5.50017 12.7979 6.61198 12.7539 8H15C15.6904 8 16.25 7.44036 16.25 6.75V6.41699C16.25 5.91073 15.8393 5.5 15.333 5.5Z"})}),Qe=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),Ye=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z"})}),Ke=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})}),lr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7 16.5h10V15H7v1.5zm0-9V9h10V7.5H7z"})}),er=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),rr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})}),or=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})}),tr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})}),sr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})}),hr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})}),cr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})}),nr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"})}),ir=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm.8 12.5h-1.5V15h1.5v1.5Zm2.1-5.6c-.1.5-.4 1.1-.8 1.5-.4.4-.9.7-1.4.8v.8h-1.5v-1.2c0-.6.5-1 .9-1s.7-.2 1-.5c.2-.3.4-.7.4-1 0-.4-.2-.7-.5-1-.3-.3-.6-.4-1-.4s-.8.2-1.1.4c-.3.3-.4.7-.4 1.1H9c0-.6.2-1.1.5-1.6s.7-.9 1.2-1.1c.5-.2 1.1-.3 1.6-.3s1.1.3 1.5.6c.4.3.8.8 1 1.3.2.5.2 1.1.1 1.6Z"})}),xr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})}),vr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 7A2.75 2.75 0 0 1 7 4.25h10A2.75 2.75 0 0 1 19.75 7v10A2.75 2.75 0 0 1 17 19.75H7A2.75 2.75 0 0 1 4.25 17V7ZM7 5.75c-.69 0-1.25.56-1.25 1.25v10c0 .69.56 1.25 1.25 1.25h10c.69 0 1.25-.56 1.25-1.25V7c0-.69-.56-1.25-1.25-1.25H7Z"})}),wr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),ar=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})}),dr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),mr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",d:"M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",clipRule:"evenodd"})}),gr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),ur=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9 12h2v-2h2V8h-2V6H9v2H7v2h2v2zm1 4c3.9 0 7-3.1 7-7s-3.1-7-7-7-7 3.1-7 7 3.1 7 7 7zm0-12c2.8 0 5 2.2 5 5s-2.2 5-5 5-5-2.2-5-5 2.2-5 5-5zM3 19h14v-2H3v2z"})}),jr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11 8H9v2H7v2h2v2h2v-2h2v-2h-2V8zm-1-4c-3.9 0-7 3.1-7 7s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm0 12c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zM3 1v2h14V1H3z"})}),Vr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.646 9H20V8l-1-.5L12 4 5 7.5 4 8v1h14.646zm-3-1.5L12 5.677 8.354 7.5h7.292zm-7.897 9.44v-6.5h-1.5v6.5h1.5zm5-6.5v6.5h-1.5v-6.5h1.5zm5 0v6.5h-1.5v-6.5h1.5zm2.252 8.81c0 .414-.334.75-.748.75H4.752a.75.75 0 010-1.5h14.5a.75.75 0 01.749.75z"})}),fr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})}),pr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})}),Cr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),Hr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),Mr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),zr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})}),kr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),Lr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})}),Zr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})}),Br=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})}),Pr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9 13.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM9 16a4.002 4.002 0 003.8-2.75H15V16h2.5v-2.75H19v-2.5h-6.2A4.002 4.002 0 005 12a4 4 0 004 4z"})}),Sr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18,0 L2,0 C0.9,0 0.01,0.9 0.01,2 L0,12 C0,13.1 0.9,14 2,14 L18,14 C19.1,14 20,13.1 20,12 L20,2 C20,0.9 19.1,0 18,0 Z M18,12 L2,12 L2,2 L18,2 L18,12 Z M9,3 L11,3 L11,5 L9,5 L9,3 Z M9,6 L11,6 L11,8 L9,8 L9,6 Z M6,3 L8,3 L8,5 L6,5 L6,3 Z M6,6 L8,6 L8,8 L6,8 L6,6 Z M3,6 L5,6 L5,8 L3,8 L3,6 Z M3,3 L5,3 L5,5 L3,5 L3,3 Z M6,9 L14,9 L14,11 L6,11 L6,9 Z M12,6 L14,6 L14,8 L12,8 L12,6 Z M12,3 L14,3 L14,5 L12,5 L12,3 Z M15,6 L17,6 L17,8 L15,8 L15,6 Z M15,3 L17,3 L17,5 L15,5 L15,3 Z M10,20 L14,16 L6,16 L10,20 Z"})}),yr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})}),Gr=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,h.jsx)(B.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"})]}),br=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.5 10h-1.7l-3.7 10.5h1.7l.9-2.6h3.9l.9 2.6h1.7L17.5 10zm-2.2 6.3 1.4-4 1.4 4h-2.8zm-4.8-3.8c1.6-1.8 2.9-3.6 3.7-5.7H16V5.2h-5.8V3H8.8v2.2H3v1.5h9.6c-.7 1.6-1.8 3.1-3.1 4.6C8.6 10.2 7.8 9 7.2 8H5.6c.6 1.4 1.7 2.9 2.9 4.4l-2.4 2.4c-.3.4-.7.8-1.1 1.2l1 1 1.2-1.2c.8-.8 1.6-1.5 2.3-2.3.8.9 1.7 1.7 2.5 2.5l.6-1.5c-.7-.6-1.4-1.3-2.1-2z"})}),_r=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),Rr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m13.53 8.47-1.06 1.06-2.72-2.72V12h-1.5V6.81L5.53 9.53 4.47 8.47 9 3.94l4.53 4.53Zm-1.802 7.968c1.307.697 3.235.812 5.772.812v1.5c-2.463 0-4.785-.085-6.478-.988a4.721 4.721 0 0 1-2.07-2.13C8.48 14.67 8.25 13.471 8.25 12h1.5c0 1.328.208 2.28.548 2.969.332.675.81 1.138 1.43 1.47Z"})}),Wr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{clipRule:"evenodd",fillRule:"evenodd",d:"M17.375 15.656A6.47 6.47 0 0018.5 12a6.47 6.47 0 00-.943-3.374l-1.262.813c.448.749.705 1.625.705 2.561a4.977 4.977 0 01-.887 2.844l1.262.813zm-1.951 1.87l-.813-1.261A4.976 4.976 0 0112 17c-.958 0-1.852-.27-2.613-.736l-.812 1.261A6.47 6.47 0 0012 18.5a6.47 6.47 0 003.424-.974zm-8.8-1.87A6.47 6.47 0 015.5 12c0-1.235.344-2.39.943-3.373l1.261.812A4.977 4.977 0 007 12c0 1.056.328 2.036.887 2.843l-1.262.813zm2.581-7.803A4.977 4.977 0 0112 7c1.035 0 1.996.314 2.794.853l.812-1.262A6.47 6.47 0 0012 5.5a6.47 6.47 0 00-3.607 1.092l.812 1.261zM12 20a8 8 0 100-16 8 8 0 000 16zm0-4.5a3.5 3.5 0 100-7 3.5 3.5 0 000 7z"})}),Ar=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})}),Nr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z"})}),qr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M5 11.25h14v1.5H5z"})}),Tr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})}),Dr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),Fr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Or=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})}),Ir=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})}),Ur=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})}),Er=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})}),$r=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})}),Jr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"})}),Xr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})}),Qr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})}),Yr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z"})}),Kr=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})}),lo=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),eo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z"})}),ro=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})}),oo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})}),to=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})}),so=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),ho=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})}),co=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"})}),no=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z"})}),io=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),xo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),vo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),wo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zm7.01 2.75q.711 0 1.24.364.533.364.824 1.012.296.645.296 1.488 0 .887-.296 1.556-.292.664-.824 1.036-.528.368-1.24.368-.708 0-1.24-.368-.527-.372-.824-1.036-.296-.668-.296-1.556 0-.848.296-1.492.296-.648.824-1.008a2.14 2.14 0 0 1 1.24-.364m-3.484 3.6h.72v.832h-.72v1.28h-.984v-1.28H4.75l3.08-4.32h.696zm9.522 0h.72v.832h-.72v1.28h-.983v-1.28h-2.793l3.08-4.32h.696zm-6.038-2.696q-.568 0-.952.48-.384.475-.384 1.48 0 .716.176 1.168.176.45.476.66.304.212.684.212t.68-.208q.304-.207.48-.656.176-.451.176-1.176 0-.996-.384-1.476-.38-.484-.952-.484M6.33 12.85h1.212v-1.722zm9.523 0h1.211v-1.722z"})}),ao=(0,h.jsx)(B.SVG,{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M1.36605 2.81332L2.30144 1.87332L13.5592 13.1867L12.6239 14.1267L7.92702 9.40666C6.74618 9.41999 5.57861 9.87999 4.68302 10.78L3.35623 9.44665C4.19874 8.60665 5.2071 8.03999 6.2818 7.75332L4.7958 6.25999C3.78744 6.67332 2.84542 7.29332 2.02944 8.11332L0.702656 6.77999C1.512 5.97332 2.42085 5.33332 3.3894 4.84665L1.36605 2.81332ZM15.2973 6.77999L13.9705 8.11332C12.3054 6.43999 10.1096 5.61332 7.92039 5.62666L6.20883 3.90665C9.41303 3.34665 12.8229 4.29332 15.2973 6.77999ZM10.1759 7.89332C11.0781 8.21332 11.9273 8.72665 12.6438 9.44665L12.1794 9.90665L10.1759 7.89332ZM6.00981 12.1133L8 14.1133L9.99018 12.1133C8.89558 11.0067 7.11105 11.0067 6.00981 12.1133Z"})}),mo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})}),go=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z"})}),uo=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,h.jsx)(B.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),jo=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,h.jsx)(B.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,h.jsx)(B.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]}),Vo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})}),fo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h.jsx)(B.Path,{d:"M10 17.5H7v-11h3zm7 0h-3v-11h3z"})}),po=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z"})}),Co=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),Ho=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})}),Mo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z"})}),zo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",d:"M6.5 8a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zM8 5a3 3 0 100 6 3 3 0 000-6zm6.5 11a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm1.5-3a3 3 0 100 6 3 3 0 000-6zM5.47 17.41a.75.75 0 001.06 1.06L18.47 6.53a.75.75 0 10-1.06-1.06L5.47 17.41z",clipRule:"evenodd"})}),ko=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})}),Lo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})}),Zo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h.jsx)(B.Path,{d:"m8 18 9-6-9-6z"})}),Bo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})}),Po=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm3.8 8.8h-3v3h-1.5v-3h-3v-1.5h3v-3h1.5v3h3v1.5Z"})}),So=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M7.404 16.596a6.5 6.5 0 1 0 9.192-9.192 6.5 6.5 0 0 0-9.192 9.192ZM6.344 6.343a8 8 0 1 0 11.313 11.314A8 8 0 0 0 6.343 6.343Zm4.906 9.407v-3h-3v-1.5h3v-3h1.5v3h3v1.5h-3v3h-1.5Z"})}),yo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),Go=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),bo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),_o=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Ro=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z"})}),Wo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z"})}),Ao=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"})}),No=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"})}),qo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"})}),To=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})}),Do=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,h.jsx)(B.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})]}),Fo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})}),Oo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})}),Io=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})}),Uo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})}),Eo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})}),$o=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"})}),Jo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),Xo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})}),Qo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),Yo=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})}),Ko=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})}),lt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})}),et=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})}),rt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})}),ot=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"})}),tt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"})}),st=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.83 6.342l.602.3.625-.25.443-.176v12.569l-.443-.178-.625-.25-.603.301-1.444.723-2.41-.804-.475-.158-.474.158-2.41.803-1.445-.722-.603-.3-.625.25-.443.177V6.215l.443.178.625.25.603-.301 1.444-.722 2.41.803.475.158.474-.158 2.41-.803 1.445.722zM20 4l-1.5.6-1 .4-2-1-3 1-3-1-2 1-1-.4L5 4v17l1.5-.6 1-.4 2 1 3-1 3 1 2-1 1 .4 1.5.6V4zm-3.5 6.25v-1.5h-8v1.5h8zm0 3v-1.5h-8v1.5h8zm-8 3v-1.5h8v1.5h-8z"})}),ht=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),ct=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M8.45474 21.2069L16.4547 3.7069L15.5453 3.29114L14.2837 6.05081C13.5991 5.69873 12.8228 5.49999 12 5.49999C10.9385 5.49999 9.95431 5.83076 9.1448 6.39485L7.18994 4.44L6.12928 5.50066L8.05556 7.42694C7.49044 8.15127 7.12047 9.0353 7.02469 9.99999H5V11.5H7V13H5V14.5H7.10002C7.35089 15.7359 8.0576 16.8062 9.03703 17.5279L7.54526 20.7911L8.45474 21.2069ZM9.68024 16.1209C8.95633 15.4796 8.5 14.5431 8.5 13.5V10.5C8.5 8.567 10.067 6.99999 12 6.99999C12.6003 6.99999 13.1653 7.15111 13.659 7.41738L9.68024 16.1209ZM15.3555 9.50155L16.1645 7.73191C16.6053 8.39383 16.8926 9.16683 16.9753 9.99999H19V11.5H17V13H19V14.5H16.9C16.4367 16.7822 14.419 18.5 12 18.5C11.7508 18.5 11.5058 18.4818 11.2664 18.4466L11.928 16.9993C11.9519 16.9998 11.9759 17 12 17C13.933 17 15.5 15.433 15.5 13.5V10.5C15.5 10.1531 15.4495 9.81794 15.3555 9.50155Z"})}),nt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})}),it=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h.jsx)(B.Path,{d:"m14.47 11.47 1.06 1.061 1.72-1.72v4.439a.25.25 0 0 1-.25.25h-6.379l-1.5 1.5H17a1.75 1.75 0 0 0 1.75-1.75v-4.438l1.72 1.72 1.06-1.061L18 7.94zM7 7a1.75 1.75 0 0 0-1.75 1.75v4.44l-1.72-1.72-1.06 1.06L6 16.06l3.53-3.53-1.06-1.06-1.72 1.72V8.75A.25.25 0 0 1 7 8.5h6.379l1.5-1.5z"})}),xt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M16 10h4c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-4c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1zm-8 4H4c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h4c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm10-2.6L14.5 15l1.1 1.1 1.7-1.7c-.1 1.1-.3 2.3-.9 2.9-.3.3-.7.5-1.3.5h-4.5v1.5H15c.9 0 1.7-.3 2.3-.9 1-1 1.3-2.7 1.4-4l1.8 1.8 1.1-1.1-3.6-3.7zM6.8 9.7c.1-1.1.3-2.3.9-2.9.4-.4.8-.6 1.3-.6h4.5V4.8H9c-.9 0-1.7.3-2.3.9-1 1-1.3 2.7-1.4 4L3.5 8l-1 1L6 12.6 9.5 9l-1-1-1.7 1.7z"})}),vt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h.jsx)(B.Path,{d:"M13.75 4.194a8 8 0 0 0-4.812.415l-.301.132a8 8 0 0 0-3.203 2.691L4 6v4h4L6.517 8.515q.333-.525.758-.976l.013-.014a6.5 6.5 0 0 1 2.942-1.78q.033-.008.065-.018.095-.026.19-.049l.082-.018q.104-.024.207-.044l.059-.01q.33-.06.673-.086l.1-.008.131-.006q.102-.004.203-.005L12 5.5h.046l.225.006q.042.002.083.003a7 7 0 0 1 .476.044l.092.012.183.03q.029.004.056.009l.149.027a6.5 6.5 0 0 1 1.607.559l.018.01q.394.2.756.45.086.06.17.12.047.035.093.071a7 7 0 0 1 .381.316l.059.053q.082.075.162.154l.053.052q.293.294.548.627.014.017.028.036l.073.1.096.134.07.106q.047.071.092.142l.069.112a6.7 6.7 0 0 1 .578 1.26 6.5 6.5 0 0 1 .255 1.037l.018.12a6 6 0 0 1 .038.33 7 7 0 0 1 .018.88q-.003.071-.009.142l-.01.133a7 7 0 0 1-.055.453l-.025.144a6.5 6.5 0 0 1-.808 2.153l-.07.112a6 6 0 0 1-.257.383l-.073.1-.028.037q-.255.331-.548.626l-.063.062a7 7 0 0 1-.592.512q-.045.035-.093.071-.077.057-.157.111-.364.253-.76.456l-.027.013a6.5 6.5 0 0 1-1.995.625q-.045.007-.092.012a7 7 0 0 1-.476.044l-.083.003-.225.006L12 18.5l-.06-.002-.203-.006-.132-.006-.1-.008a7 7 0 0 1-.672-.086l-.059-.01-.207-.044-.082-.018-.19-.049-.065-.018a6.5 6.5 0 0 1-3.858-3.004l-1.3.75a8 8 0 0 0 3.565 3.26l.301.131a8 8 0 0 0 11.055-7.061l.007-.33c0-1.76-.581-3.473-1.653-4.87l-.206-.256a8 8 0 0 0-4.07-2.601zM10 14.999l5-3-5-3z"})}),wt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7 11.5h10V13H7z"})}),at=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z"})}),dt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})}),mt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})}),gt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})}),ut=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})}),jt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"})}),Vt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})}),ft=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})}),pt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),Ct=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.332 5.748c-1.03-.426-2.06.607-1.632 1.636l1.702 3.93 7.481.575c.123.01.123.19 0 .2l-7.483.575-1.7 3.909c-.429 1.029.602 2.062 1.632 1.636l12.265-5.076c1.03-.426 1.03-1.884 0-2.31L6.332 5.748Z"})}),Ht=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z"})}),Mt=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,h.jsx)(B.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),zt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})}),kt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"})}),Lt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.176l6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 01-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176zM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21z"})}),Zt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"})}),Bt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"})}),Pt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})}),St=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),yt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})}),Gt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.2 5.3h8V3.8h-8v1.5zm0 14.5h8v-1.5h-8v1.5zm3.5-6.5h1v-1h-1v1zm1-6.5h-1v.5h1v-.5zm-1 4.5h1v-1h-1v1zm0-2h1v-1h-1v1zm0 7.5h1v-.5h-1v.5zm1-2.5h-1v1h1v-1zm-8.5 1.5h1.5v-8H4.2v8zm14.5-8v8h1.5v-8h-1.5zm-5 4.5v-1h-1v1h1zm-6.5 0h.5v-1h-.5v1zm3.5-1v1h1v-1h-1zm6 1h.5v-1h-.5v1zm-8-1v1h1v-1h-1zm6 0v1h1v-1h-1z"})}),bt=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,h.jsx)(B.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]}),_t=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,h.jsx)(B.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,h.jsx)(B.Path,{d:"m18 7.5v9h1.5v-9z"})]}),Rt=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,h.jsx)(B.Path,{d:"m4.5 16.5v-9h1.5v9z"})]}),Wt=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,h.jsx)(B.Path,{d:"m18 16.5v-9h1.5v9z"})]}),At=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,h.jsx)(B.Path,{d:"m16.5 6h-9v-1.5h9z"})]}),Nt=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,h.jsx)(B.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,h.jsx)(B.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]}),qt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z"})}),Tt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h.jsx)(B.Path,{d:"m17.5 18-9-6 9-6zM8 6.5v11H6.5v-11z"})}),Dt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h.jsx)(B.Path,{d:"m15.5 12-9 6V6zm2 5.5H16v-11h1.5z"})}),Ft=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})}),Ot=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})}),It=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z"})}),Ut=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),Et=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})}),$t=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z"})}),Jt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})}),Xt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Qt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),Yt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"})}),Kt=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"})}),ls=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7.1 5.7 8 6.9c.4-.3.9-.6 1.5-.8l-.6-1.4c-.7.3-1.3.6-1.8 1ZM4.6 8.9l1.4.6c.2-.5.5-1 .8-1.5l-1.2-.9c-.4.6-.8 1.2-1 1.8Zm14.8 0c-.3-.7-.6-1.3-1-1.8l-1.2.9c.3.4.6.9.8 1.5l1.4-.6ZM7.1 18.3c.6.4 1.2.8 1.8 1l.6-1.4c-.5-.2-1-.5-1.5-.8l-.9 1.2ZM5.5 12v-.9h-.7l-.7-.2v2l1.5-.2v-.9Zm-.7 3h-.2c.3.7.6 1.3 1 1.9l1.2-.9c-.3-.4-.6-.9-.8-1.5l-1.2.5Zm9.7 3 .5 1.2v.2c.7-.3 1.3-.6 1.9-1l-.9-1.2c-.4.3-.9.6-1.5.8Zm-2.5.5h-.9l-.2 1.3v.2h2l-.2-1.5h-.9Zm7.9-7.5-1.5.2V13h.7l.7.2v-2ZM18 14.5c-.2.5-.5 1-.8 1.5l1.2.9c.4-.6.8-1.2 1-1.8h-.2l-1.2-.6ZM11 4.1l.2 1.5H13V4.2h-1.9ZM14.5 6c.5.2 1 .5 1.5.8l.9-1.2c-.6-.4-1.2-.8-1.8-1L14.5 6Z"})}),es=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),rs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),os=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.2 9.5h-3.5c-1 0-1.8.8-1.8 1.8v2.5h1.5v-2.5c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5v-2.5c0-1-.8-1.8-1.8-1.8Zm-9 0H5.7c-1 0-1.8.8-1.8 1.8v2.5h7v-2.5c0-1-.8-1.8-1.8-1.8Z"})}),ts=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 16.5h13V15H4v1.5ZM4 12v1.5h16V12H4Zm1.5-4.2c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5V7.8c0-1-.8-1.8-1.8-1.8H5.6c-1 0-1.8.8-1.8 1.8v2.5h1.5V7.8Z"})}),ss=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z"})}),hs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z"})}),cs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h3.5v15Zm11-.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14ZM16.9 8.8l-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1L18 9.9l-1.1-1.1Z"})}),ns=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),(0,h.jsx)(B.Path,{d:"M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})]}),is=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z"})}),xs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z"})}),vs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-15V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v3.5Zm-9.6 9.4 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1 2.1-2.1-1.1-1.1-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1Z"})}),ws=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 2v6.2h-6.8V4.4h6.2c.3 0 .5.2.5.5ZM5 4.5h6.2v6.8H4.4V5.1c0-.3.2-.5.5-.5ZM4.5 19v-6.2h6.8v6.8H5.1c-.3 0-.5-.2-.5-.5Zm14.5.5h-6.2v-6.8h6.8v6.2c0 .3-.2.5-.5.5Z"})}),as=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})}),ds=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4 16.5h13V15H4v1.5Zm0-3h16V12H4v1.5ZM18.2 6h-3.5c-1 0-1.8.8-1.8 1.8v2.5h1.5V7.8c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5V7.8c0-1-.8-1.8-1.8-1.8ZM11 7.8c0-1-.8-1.8-1.8-1.8H5.7c-1 0-1.8.8-1.8 1.8v2.5h7V7.8Z"})}),ms=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),gs=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"M 12.841306,16.677917 12.001264,12.71529 Q 11.835801,11.930402 11.695793,11.417042 11.560029,10.89944 11.398809,10.568514 11.237588,10.237588 11,10 10.635133,9.6351329 10.219354,9.6351329 9.8078183,9.6308902 9.4387086,10 8.9932313,10.445477 8.8574668,11.022476 8.7259449,11.595233 8.7259449,12.155262 L 7.4955791,11.196425 Q 7.5719467,10.509117 7.8307477,9.9109045 8.0937915,9.3084495 8.6410921,8.7611489 9.1799075,8.2223335 9.7569066,8.086569 q 0.5812414,-0.1400071 1.1242994,0.046669 0.543058,0.1866762 0.975808,0.6194255 0.335168,0.3351686 0.581242,0.767918 0.24183,0.4285067 0.436992,1.0564174 0.195161,0.619426 0.381837,1.527351 l 0.364867,1.756453 1.883733,-1.883732 1.018234,1.018233 z"}),(0,h.jsx)(B.Path,{d:"M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z"})]}),us=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})}),js=(0,h.jsxs)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,h.jsx)(B.Path,{d:"m14.95 13.889-1.061 1.061-5.552-5.553 1.06-1.06 5.552 5.552Z"}),(0,h.jsx)(B.Path,{d:"M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z"})]}),Vs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"})}),fs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})}),ps=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})}),Cs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19.8 4h-1.5l1 8h1.5l-1-8ZM17 5.8c-.1-1-1-1.8-2-1.8H6.8c-.9 0-1.7.6-1.9 1.4l-1.8 6C2.7 12.7 3.7 14 5 14h4.4l-.8 3.6c-.3 1.3.7 2.4 1.9 2.4h.2c.6 0 1.2-.3 1.6-.8l5-6.6c.3-.4.5-.9.4-1.5L17 5.7Zm-.9 5.9-5 6.6c0 .1-.2.2-.4.2h-.2c-.3 0-.6-.3-.5-.6l.8-3.6c.1-.4 0-.9-.3-1.3s-.7-.6-1.2-.6H4.9c-.3 0-.6-.3-.5-.6l1.8-6c0-.2.3-.4.5-.4h8.2c.3 0 .5.2.5.4l.7 5.4v.4Z"})}),Hs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m3 12 1 8h1.5l-1-8H3Zm15.8-2h-4.4l.8-3.6c.3-1.3-.7-2.4-1.9-2.4h-.2c-.6 0-1.2.3-1.6.8l-5 6.6c-.3.4-.4.8-.4 1.2v.2l.7 5.4v.2c.2.9 1 1.5 1.9 1.5h8.2c.9 0 1.7-.6 1.9-1.4l1.8-6c.4-1.3-.6-2.6-1.9-2.6Zm.5 2.1-1.8 6c0 .2-.3.4-.5.4H8.8c-.3 0-.5-.2-.5-.4l-.7-5.4v-.4l5-6.6c0-.1.2-.2.4-.2h.2c.3 0 .6.3.5.6l-.8 3.6c-.1.4 0 .9.3 1.3s.7.6 1.2.6h4.4c.3 0 .6.3.5.6Z"})}),Ms=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"})}),zs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"})}),ks=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})}),Ls=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M14.103 7.128l2.26-2.26a4 4 0 00-5.207 4.804L5.828 15a2 2 0 102.828 2.828l5.329-5.328a4 4 0 004.804-5.208l-2.261 2.26-1.912-.512-.513-1.912zm-7.214 9.64a.5.5 0 11.707-.707.5.5 0 01-.707.707z"})}),Zs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),Bs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M4.195 8.245a.75.75 0 011.06-.05l5.004 4.55 4.025-3.521L19 13.939V10.75h1.5v5.75h-5.75V15h3.19l-3.724-3.723-3.975 3.478-5.995-5.45a.75.75 0 01-.051-1.06z"})}),Ps=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M3.445 16.505a.75.75 0 001.06.05l5.005-4.55 4.024 3.521 4.716-4.715V14h1.5V8.25H14v1.5h3.19l-3.724 3.723L9.49 9.995l-5.995 5.45a.75.75 0 00-.05 1.06z"})}),Ss=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})}),ys=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),Gs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})}),bs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})}),_s=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})}),Rs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"})}),Ws=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})}),As=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),Ns=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})}),qs=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M6 3H8V5H16V3H18V5C19.1046 5 20 5.89543 20 7V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V7C4 5.89543 4.89543 5 6 5V3ZM18 6.5H6C5.72386 6.5 5.5 6.72386 5.5 7V8H18.5V7C18.5 6.72386 18.2761 6.5 18 6.5ZM18.5 9.5H5.5V19C5.5 19.2761 5.72386 19.5 6 19.5H18C18.2761 19.5 18.5 19.2761 18.5 19V9.5ZM11 11H13V13H11V11ZM7 11V13H9V11H7ZM15 13V11H17V13H15Z"})}),Ts=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z"})}),Ds=(0,h.jsx)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",fill:"currentColor",children:(0,h.jsx)(B.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});const Fs=l=>(0,h.jsx)("svg",{className:"flexa-icon",viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:l});Fs((0,h.jsx)("path",{d:"M5 12h13M13 6l6 6-6 6"})),Fs((0,h.jsx)("path",{d:"M19 12H6M11 6l-6 6 6 6"})),Fs((0,h.jsx)("path",{d:"M9 6l6 6-6 6"})),Fs((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("path",{d:"M15 4h5v5"}),(0,h.jsx)("path",{d:"M20 4l-8 8"}),(0,h.jsx)("path",{d:"M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5"})]})),Fs((0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("path",{d:"M12 4v11m0 0l-4-4m4 4l4-4"}),(0,h.jsx)("path",{d:"M5 19h14"})]})),Fs((0,h.jsx)("path",{d:"M5 12l4 4L19 6"})),Object.entries(o).filter(([,l])=>(0,x.isValidElement)(l)).map(([l,e])=>({name:"wp-"+l,key:l.toLowerCase(),icon:e}));const Os=({layout:l,style:e,advanced:r})=>{const o=[{name:"layout",title:(0,i.__)("Layout","flexa-block")},{name:"style",title:(0,i.__)("Style","flexa-block")},{name:"advanced",title:(0,i.__)("Advanced","flexa-block")}],t={layout:l,style:e,advanced:r};return(0,h.jsx)(v.TabPanel,{className:"flexa-tabs",tabs:o,initialTabName:"layout",children:l=>(0,h.jsx)("div",{className:"flexa-tab__content",children:t[l.name]})})},Is=[{value:"100",label:(0,i.__)("Full","flexa-block")},{value:"50",label:(0,i.__)("Half","flexa-block")}],Us=["select","radio","checkbox"],Es=["email","text","tel","url","date","textarea","select"],$s=l=>Us.includes(l),Js=l=>Es.includes(l),Xs=(l,e)=>(l||"").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||e,Qs=({attributes:l,setAttributes:e,fallbackName:r,kind:o})=>{const{label:t,fieldName:s,placeholder:c,required:n,showLabel:x,width:w,rows:a,options:d,value:m,accept:g,multiple:u,maxSize:j}=l;return"hidden"===o?(0,h.jsxs)(v.PanelBody,{title:(0,i.__)("Hidden field","flexa-block"),initialOpen:!0,children:[(0,h.jsx)(v.TextControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Field name","flexa-block"),value:s??"",placeholder:r,onChange:l=>e({fieldName:l})}),(0,h.jsx)(v.TextControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Value","flexa-block"),help:(0,i.__)("A fixed value sent with the submission (e.g. a source tag).","flexa-block"),value:m??"",onChange:l=>e({value:l})})]}):(0,h.jsxs)(v.PanelBody,{title:(0,i.__)("Field","flexa-block"),initialOpen:!0,children:[(0,h.jsx)(v.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Show label","flexa-block"),checked:!1!==x,onChange:l=>e({showLabel:l})}),!1!==x&&(0,h.jsx)(v.TextControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Label","flexa-block"),value:t??"",onChange:l=>e({label:l})}),Js(o)&&(0,h.jsx)(v.TextControl,{__nextHasNoMarginBottom:!0,label:"select"===o?(0,i.__)("Prompt","flexa-block"):(0,i.__)("Placeholder","flexa-block"),value:c??"",onChange:l=>e({placeholder:l})}),$s(o)&&(0,h.jsx)(v.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Options","flexa-block"),help:(0,i.__)("One choice per line.","flexa-block"),value:(d??[]).join("\n"),onChange:l=>{return e({options:(r=l,r.split("\n").map(l=>l.trim()).filter(l=>""!==l))});var r}}),"upload"===o&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(v.TextControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Accepted files","flexa-block"),help:(0,i.__)('An accept list, e.g. ".pdf,.jpg,image/*". Leave blank to allow any.',"flexa-block"),value:g??"",onChange:l=>e({accept:l})}),(0,h.jsx)(v.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Allow multiple files","flexa-block"),checked:!!u,onChange:l=>e({multiple:l})}),(0,h.jsx)(v.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Max size (MB)","flexa-block"),value:j??5,min:1,max:25,onChange:l=>e({maxSize:l??5})})]}),(0,h.jsx)(v.TextControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Field name","flexa-block"),help:(0,i.__)("The key this field is emailed under. Leave blank to derive it from the label.","flexa-block"),value:s??"",placeholder:Xs(t??"",r),onChange:l=>e({fieldName:l})}),(0,h.jsx)(v.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Required","flexa-block"),checked:!!n,onChange:l=>e({required:l})}),(0,h.jsx)(C,{label:(0,i.__)("Width","flexa-block"),value:w||"100",onChange:l=>e({width:l}),options:Is}),"textarea"===o&&(0,h.jsx)(v.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Rows","flexa-block"),value:a??4,min:2,max:12,onChange:l=>e({rows:l??4})})]})},Ys=({kind:l,attributes:e})=>{const{placeholder:r,rows:o,options:t,multiple:s}=e,c=t??[];return"textarea"===l?(0,h.jsx)("textarea",{className:"flexa-field__control",placeholder:r,rows:o??4,disabled:!0}):"select"===l?(0,h.jsxs)("select",{className:"flexa-field__control",disabled:!0,children:[r&&(0,h.jsx)("option",{children:r}),c.map((l,e)=>(0,h.jsx)("option",{children:l},e))]}):"radio"===l||"checkbox"===l?(0,h.jsx)("div",{className:`flexa-field__options flexa-field__options--${l}`,children:c.map((e,r)=>(0,h.jsxs)("label",{className:"flexa-field__option",children:[(0,h.jsx)("input",{type:l,className:"flexa-field__choice",disabled:!0}),(0,h.jsx)("span",{children:e})]},r))}):"toggle"===l?(0,h.jsxs)("span",{className:"flexa-field__toggle",children:[(0,h.jsx)("input",{type:"checkbox",className:"flexa-field__toggle-input"}),(0,h.jsx)("span",{className:"flexa-field__switch-track","aria-hidden":"true"})]}):"upload"===l?(0,h.jsx)("input",{className:"flexa-field__control",type:"file",multiple:!!s,disabled:!0}):(0,h.jsx)("input",{className:"flexa-field__control",type:l,placeholder:r,disabled:!0})},Ks=({kind:l,fallbackName:e,attributes:r,setAttributes:o,clientId:t})=>{const{label:s,placeholder:c,required:n,showLabel:v,width:w,fieldName:a,value:d,blockId:m,className:u}=r;((l,e,r)=>{(0,x.useEffect)(()=>{const o=l.replace(/[^a-z0-9]/gi,"").slice(0,8);e&&e===o||r({blockId:o})},[e,l,r])})(t,m,o);const j="hidden"===l,V=(0,L.useBlockProps)({className:g("flexa-field",!j&&`flexa-field--w${w||"100"}`,j&&"flexa-field--hidden-edit",m&&`flexa-subscribe-field-${m}`,u)}),f=(0,h.jsx)(L.InspectorControls,{children:(0,h.jsx)("div",{className:"flexa-inspector flexa-subscribe-field-inspector",children:(0,h.jsx)(Os,{layout:(0,h.jsx)(Qs,{attributes:r,setAttributes:o,fallbackName:e,kind:l}),style:(0,h.jsx)(h.Fragment,{}),advanced:(0,h.jsx)(h.Fragment,{})})})});return j?(0,h.jsxs)(h.Fragment,{children:[f,(0,h.jsx)("div",{...V,children:(0,h.jsxs)("span",{className:"flexa-field__hidden-chip",children:[(0,i.__)("Hidden field","flexa-block")," · ",(0,h.jsx)("code",{children:a||e}),d?` = ${d}`:""]})})]}):(0,h.jsxs)(h.Fragment,{children:[f,(0,h.jsxs)("div",{...V,children:[!1!==v&&(s||c||e)&&(0,h.jsxs)("span",{className:"flexa-field__label",children:[s||c||e,n&&(0,h.jsx)("span",{className:"flexa-field__required",children:" *"})]}),(0,h.jsx)(Ys,{kind:l,attributes:r})]})]})},lh=n["subscribe-form-date"];(0,t.registerBlockType)(s.UU,{icon:lh,edit:function(l){return(0,h.jsx)(Ks,{kind:"date",fallbackName:"date",...l})},save:()=>null})}};const e={};function r(o){const t=e[o];if(void 0!==t)return t.exports;const s=e[o]={exports:{}};return l[o](s,s.exports,r),s.exports}r.m=l,(()=>{const l=[];r.O=(e,o,t,s)=>{if(o){s=s||0;for(var h=l.length;h>0&&l[h-1][2]>s;h--)l[h]=l[h-1];return void(l[h]=[o,t,s])}let c=1/0;for(h=0;h=s)&&Object.keys(r.O).every(l=>r.O[l](o[n]))?o.splice(n--,1):(i=!1,s{if(Array.isArray(e))for(var o=0;oObject.hasOwn(l,e),r.r=l=>{Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},(()=>{const l={6193:0,1365:0};r.O.j=e=>0===l[e];const e=(e,o)=>{let[t,s,h]=o;var c,n,i=0;if(t.some(e=>0!==l[e])){for(c in s)r.o(s,c)&&(r.m[c]=s[c]);if(h)var x=h(r)}for(e&&e(o);ir(2850));o=r.O(o)})();/*! * elFinder-Material-Theme (Light) v2.1.15 (https://github.com/RobiNN1/elFinder-Material-Theme) * Copyright 2016-2023 Róbert Kelčák * Licensed under MIT (https://github.com/RobiNN1/elFinder-Material-Theme/blob/master/LICENSE) */.elfinder{color:#546e7a;font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.elfinder.ui-widget.ui-widget-content{font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif;box-shadow:0 1px 8px rgba(0,0,0,0.6);border-radius:0;border:0}.elfinder *{outline:0!important}.elfinder-button-icon-spinner,.elfinder-info-spinner,.elfinder-navbar-spinner{background:url("../images/loading.svg") center center no-repeat!important;width:16px;height:16px}@-webkit-keyframes progress-animation{0%{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-animation{0%{background-position:1rem 0}to{background-position:0 0}}.elfinder-notify-progressbar{border:0}.elfinder-notify-progress,.elfinder-notify-progressbar{border-radius:0}.elfinder-notify-progress,.elfinder-resize-spinner{background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:1rem 1rem;-webkit-animation:progress-animation 1s linear infinite;animation:progress-animation 1s linear infinite;background-color:#0275d8;height:1rem}.elfinder .elfinder-toast>div{background-color:#323232!important;color:#d6d6d6;box-shadow:none;opacity:inherit;padding:10px 60px}.elfinder .elfinder-toast>div button.ui-button{color:#fff}.elfinder .elfinder-toast>.toast-info button.ui-button{background-color:#3498db}.elfinder .elfinder-toast>.toast-error button.ui-button{background-color:#f44336}.elfinder .elfinder-toast>.toast-success button.ui-button{background-color:#4caf50}.elfinder .elfinder-toast>.toast-warning button.ui-button{background-color:#ff9800}.elfinder-toast-msg{font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif;font-size:17px}#ace_settingsmenu{font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif;box-shadow:0 1px 30px rgba(0,0,0,0.6)!important;background-color:#1d2736!important;color:#e6e6e6!important}#ace_settingsmenu,#kbshortcutmenu{padding:0}.ace_optionsMenuEntry{padding:5px 10px}.ace_optionsMenuEntry:hover{background-color:#111721}.ace_optionsMenuEntry label{font-size:13px}#ace_settingsmenu input[type=text],#ace_settingsmenu select{margin:1px 2px 2px;padding:2px 5px;border-radius:3px;border:0;background:rgba(9,53,121,0.75);color:white!important}@font-face{font-family:material;src:url("../icons/material.eot?91804974");src:url("../icons/material.eot?91804974#iefix") format("embedded-opentype"),url("../icons/material.woff2?91804974") format("woff2"),url("../icons/material.woff?91804974") format("woff"),url("../icons/material.ttf?91804974") format("truetype"),url("../icons/material.svg?91804974#material") format("svg");font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio:0){@font-face{font-family:material;src:url("../icons/material.svg?91804974#material") format("svg")}}.elfinder .ui-icon,.elfinder-button-icon,.ui-widget-content .ui-icon,.ui-widget-header .ui-icon{font:normal normal normal 14px/1 material;background-image:inherit;text-indent:inherit}.elfinder .ui-button-icon-only .ui-icon{font:normal normal normal 14px/1 material;background-image:inherit!important;text-indent:0;font-size:16px}.elfinder-button-icon{background:inherit}.elfinder-button-icon-home:before{content:'\e800'}.elfinder-button-icon-back:before{content:'\e801'}.elfinder-button-icon-forward:before{content:'\e802'}.elfinder-button-icon-up:before{content:'\e803'}.elfinder-button-icon-dir:before{content:'\e804'}.elfinder-button-icon-opendir:before{content:'\e805'}.elfinder-button-icon-reload:before{content:'\e806'}.elfinder-button-icon-open:before{content:'\e807'}.elfinder-button-icon-mkdir:before{content:'\e808'}.elfinder-button-icon-mkfile:before{content:'\e809'}.elfinder-button-icon-rm:before{content:'\e80a'}.elfinder-button-icon-trash:before{content:'\e80b'}.elfinder-button-icon-restore:before{content:'\e80c'}.elfinder-button-icon-copy:before{content:'\e80d'}.elfinder-button-icon-cut:before{content:'\e80e'}.elfinder-button-icon-paste:before{content:'\e80f'}.elfinder-button-icon-getfile:before{content:'\e810'}.elfinder-button-icon-duplicate:before{content:'\e811'}.elfinder-button-icon-rename:before{content:'\e812'}.elfinder-button-icon-edit:before{content:'\e813'}.elfinder-button-icon-quicklook:before{content:'\e814'}.elfinder-button-icon-upload:before{content:'\e815'}.elfinder-button-icon-download:before{content:'\e816'}.elfinder-button-icon-info:before{content:'\e817'}.elfinder-button-icon-extract:before{content:'\e818'}.elfinder-button-icon-archive:before{content:'\e819'}.elfinder-button-icon-view:before{content:'\e81a'}.elfinder-button-icon-view-list:before{content:'\e81b'}.elfinder-button-icon-help:before{content:'\e81c'}.elfinder-button-icon-resize:before{content:'\e81d'}.elfinder-button-icon-link:before{content:'\e81e'}.elfinder-button-icon-search:before{content:'\e81f'}.elfinder-button-icon-sort:before{content:'\e820'}.elfinder-button-icon-rotate-r:before{content:'\e821'}.elfinder-button-icon-rotate-l:before{content:'\e822'}.elfinder-button-icon-netmount:before{content:'\e823'}.elfinder-button-icon-netunmount:before{content:'\e824'}.elfinder-button-icon-places:before{content:'\e825'}.elfinder-button-icon-chmod:before{content:'\e826'}.elfinder-button-icon-accept:before{content:'\e827'}.elfinder-button-icon-menu:before{content:'\e828'}.elfinder-button-icon-colwidth:before{content:'\e829'}.elfinder-button-icon-fullscreen:before{content:'\e82a'}.elfinder-button-icon-unfullscreen:before{content:'\e82b'}.elfinder-button-icon-empty:before{content:'\e82c'}.elfinder-button-icon-undo:before{content:'\e82d'}.elfinder-button-icon-redo:before{content:'\e82e'}.elfinder-button-icon-preference:before{content:'\e82f'}.elfinder-button-icon-mkdirin:before{content:'\e830'}.elfinder-button-icon-selectall:before{content:'\e831'}.elfinder-button-icon-selectnone:before{content:'\e832'}.elfinder-button-icon-selectinvert:before{content:'\e833'}.elfinder-button-icon-logout:before{content:'\e85a'}.elfinder-button-icon-opennew:before{content:'\e85b'}.elfinder-button-icon-hide:before{content:'\e85d'}.elfinder-button-search .ui-icon.ui-icon-search{font-size:17px}.elfinder-button-search .ui-icon:hover{opacity:1}.elfinder-navbar-icon{font:normal normal normal 16px/1 material;background-image:inherit!important}.elfinder-navbar-icon:before{content:'\e804'}.elfinder .ui-state-active .elfinder-navbar-icon:before,.elfinder .ui-state-hover .elfinder-navbar-icon:before,.elfinder-droppable-active .elfinder-navbar-icon:before{content:'\e805'}.elfinder-navbar-root-local .elfinder-navbar-icon:before{content:'\e83d'!important}.elfinder-navbar-root-ftp .elfinder-navbar-icon:before{content:'\e823'!important}.elfinder-navbar-root-sql .elfinder-navbar-icon:before{content:'\e83e'!important}.elfinder-navbar-root-dropbox .elfinder-navbar-icon:before{content:'\e83f'!important}.elfinder-navbar-root-googledrive .elfinder-navbar-icon:before{content:'\e840'!important}.elfinder-navbar-root-onedrive .elfinder-navbar-icon:before{content:'\e841'!important}.elfinder-navbar-root-box .elfinder-navbar-icon:before{content:'\e842'!important}.elfinder-navbar-root-trash .elfinder-navbar-icon:before{content:'\e80b'!important}.elfinder-navbar-root-zip .elfinder-navbar-icon:before{content:'\e85c'!important}.elfinder-navbar-root-network .elfinder-navbar-icon:before{content:'\e823'!important}.elfinder-places .elfinder-navbar-root .elfinder-navbar-icon:before{content:'\e825'!important}.elfinder-navbar-arrow{background-image:inherit!important;font:normal normal normal 14px/1 material;font-size:10px;padding-top:3px;padding-left:2px;color:#a9a9a9}.elfinder .ui-state-active .elfinder-navbar-arrow{color:#fff}.elfinder-ltr .elfinder-navbar-collapsed .elfinder-navbar-arrow:before{content:'\e857'}.elfinder-rtl .elfinder-navbar-collapsed .elfinder-navbar-arrow:before{content:'\e858'}.elfinder-ltr .elfinder-navbar-expanded .elfinder-navbar-arrow:before,.elfinder-rtl .elfinder-navbar-expanded .elfinder-navbar-arrow:before{content:'\e851'}div.elfinder-cwd-wrapper-list tr.ui-state-default td span.ui-icon{font-size:8px;margin-top:5px;margin-right:5px}div.elfinder-cwd-wrapper-list .ui-icon-grip-dotted-vertical{margin:2px}.elfinder-cwd-view-list .elfinder-navbar-root-box td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-dropbox td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-ftp td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-googledrive td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-local td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-network td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-onedrive td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-sql td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-trash td .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-zip td .elfinder-cwd-icon,.elfinder-navbar-root-box .elfinder-cwd-icon,.elfinder-navbar-root-dropbox .elfinder-cwd-icon,.elfinder-navbar-root-ftp .elfinder-cwd-icon,.elfinder-navbar-root-googledrive .elfinder-cwd-icon,.elfinder-navbar-root-local .elfinder-cwd-icon,.elfinder-navbar-root-network .elfinder-cwd-icon,.elfinder-navbar-root-onedrive .elfinder-cwd-icon,.elfinder-navbar-root-sql .elfinder-cwd-icon,.elfinder-navbar-root-trash .elfinder-cwd-icon,.elfinder-navbar-root-zip .elfinder-cwd-icon{background-image:inherit}.elfinder-cwd-view-list .elfinder-navbar-root-box td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-dropbox td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-ftp td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-googledrive td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-local td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-network td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-onedrive td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-sql td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-trash td .elfinder-cwd-icon:before,.elfinder-cwd-view-list .elfinder-navbar-root-zip td .elfinder-cwd-icon:before,.elfinder-navbar-root-box .elfinder-cwd-icon:before,.elfinder-navbar-root-dropbox .elfinder-cwd-icon:before,.elfinder-navbar-root-ftp .elfinder-cwd-icon:before,.elfinder-navbar-root-googledrive .elfinder-cwd-icon:before,.elfinder-navbar-root-local .elfinder-cwd-icon:before,.elfinder-navbar-root-network .elfinder-cwd-icon:before,.elfinder-navbar-root-onedrive .elfinder-cwd-icon:before,.elfinder-navbar-root-sql .elfinder-cwd-icon:before,.elfinder-navbar-root-trash .elfinder-cwd-icon:before,.elfinder-navbar-root-zip .elfinder-cwd-icon:before{font-family:material;background-color:transparent;color:#525252;font-size:55px;position:relative;top:-10px!important;padding:0;display:contents!important}.elfinder-cwd-view-list .elfinder-navbar-root-local td .elfinder-cwd-icon:before,.elfinder-navbar-root-local .elfinder-cwd-icon:before{content:'\e83d'}.elfinder-cwd-view-list .elfinder-navbar-root-ftp td .elfinder-cwd-icon:before,.elfinder-navbar-root-ftp .elfinder-cwd-icon:before{content:'\e823'}.elfinder-cwd-view-list .elfinder-navbar-root-sql td .elfinder-cwd-icon:before,.elfinder-navbar-root-sql .elfinder-cwd-icon:before{content:'\e83e'}.elfinder-cwd-view-list .elfinder-navbar-roor-dropbox td .elfinder-cwd-icon:before,.elfinder-navbar-roor-dropbox .elfinder-cwd-icon:before{content:'\e83f'}.elfinder-cwd-view-list .elfinder-navbar-roor-googledrive td .elfinder-cwd-icon:before,.elfinder-navbar-roor-googledrive .elfinder-cwd-icon:before{content:'\e840'}.elfinder-cwd-view-list .elfinder-navbar-roor-onedrive td .elfinder-cwd-icon:before,.elfinder-navbar-roor-onedrive .elfinder-cwd-icon:before{content:'\e841'}.elfinder-cwd-view-list .elfinder-navbar-roor-box td .elfinder-cwd-icon:before,.elfinder-navbar-roor-box .elfinder-cwd-icon:before{content:'\e842'}.elfinder-cwd-view-list .elfinder-navbar-root-trash td .elfinder-cwd-icon:before,.elfinder-navbar-root-trash .elfinder-cwd-icon:before{content:'\e80b'}.elfinder-cwd-view-list .elfinder-navbar-root-zip td .elfinder-cwd-icon:before,.elfinder-navbar-root-zip .elfinder-cwd-icon:before{content:'\e85c'}.elfinder-cwd-view-list .elfinder-navbar-root-network td .elfinder-cwd-icon:before,.elfinder-navbar-root-network .elfinder-cwd-icon:before{content:'\e823'}.elfinder-dialog-icon{font:normal normal normal 14px/1 material;background:inherit;color:#524949;font-size:37px}.elfinder-dialog-icon:before{content:'\e843'}.elfinder-dialog-icon-mkdir:before{content:'\e808'}.elfinder-dialog-icon-mkfile:before{content:'\e809'}.elfinder-dialog-icon-copy:before{content:'\e80d'}.elfinder-dialog-icon-move:before,.elfinder-dialog-icon-prepare:before{content:'\e844'}.elfinder-dialog-icon-chunkmerge:before,.elfinder-dialog-icon-upload:before{content:'\e815'}.elfinder-dialog-icon-rm:before{content:'\e80a'}.elfinder-dialog-icon-file:before,.elfinder-dialog-icon-open:before,.elfinder-dialog-icon-readdir:before{content:'\e807'}.elfinder-dialog-icon-reload:before{content:'\e806'}.elfinder-dialog-icon-download:before{content:'\e816'}.elfinder-dialog-icon-save:before{content:'\e845'}.elfinder-dialog-icon-rename:before{content:'\e812'}.elfinder-dialog-icon-archive:before,.elfinder-dialog-icon-zipdl:before{content:'\e819'}.elfinder-dialog-icon-extract:before{content:'\e818'}.elfinder-dialog-icon-search:before{content:'\e81f'}.elfinder-dialog-icon-loadimg:before{content:'\e846'}.elfinder-dialog-icon-url:before{content:'\e81e'}.elfinder-dialog-icon-resize:before{content:'\e81d'}.elfinder-dialog-icon-netmount:before{content:'\e823'}.elfinder-dialog-icon-netunmount:before{content:'\e824'}.elfinder-dialog-icon-chmod:before{content:'\e826'}.elfinder-dialog-icon-dim:before,.elfinder-dialog-icon-preupload:before{content:'\e847'}.elfinder-contextmenu .elfinder-contextmenu-item span.elfinder-contextmenu-icon{font-size:16px}.elfinder-contextmenu .elfinder-contextmenu-item .elfinder-contextsubmenu-item .ui-icon{font-size:15px}.elfinder-contextmenu .elfinder-contextmenu-item .elfinder-button-icon-link:before{content:'\e837'}.elfinder .elfinder-contextmenu-extra-icon{margin-top:-6px}.elfinder .elfinder-contextmenu-extra-icon a{padding:5px;margin:-16px}.elfinder-button-icon-link:before{content:'\e81e'!important}.elfinder .elfinder-contextmenu-arrow{font:normal normal normal 14px/1 material;background-image:inherit;font-size:10px!important;padding-top:3px}.elfinder .elfinder-contextmenu-arrow:before{content:'\e857'}.elfinder-contextmenu .ui-state-hover .elfinder-contextmenu-arrow{background-image:inherit}.elfinder-quicklook .ui-resizable-se{background:inherit}.elfinder-quicklook-navbar-icon{background:transparent;font:normal normal normal 14px/1 material;font-size:24px;width:24px;height:24px;color:#fff}.elfinder-quicklook-titlebar-icon{margin-top:-8px}.elfinder-quicklook-titlebar-icon .ui-icon{border:0;opacity:0.8;font-size:15px;padding:1px}.elfinder-quicklook .ui-icon-gripsmall-diagonal-se,.elfinder-quicklook-titlebar .ui-icon-circle-close{color:#f1f1f1}.elfinder-quicklook-navbar-icon-prev:before{content:'\e848'}.elfinder-quicklook-navbar-icon-next:before{content:'\e849'}.elfinder-quicklook-navbar-icon-fullscreen:before{content:'\e84a'}.elfinder-quicklook-navbar-icon-fullscreen-off:before{content:'\e84b'}.elfinder-quicklook-navbar-icon-close:before{content:'\e84c'}.elfinder .ui-button-icon{background-image:inherit}.elfinder .ui-icon-search:before{content:'\e81f'}.elfinder .ui-icon-close:before,.elfinder .ui-icon-closethick:before{content:'\e839'}.elfinder .ui-icon-circle-close:before{content:'\e84c'}.elfinder .ui-icon-gear:before{content:'\e82f'}.elfinder .ui-icon-gripsmall-diagonal-se:before{content:'\e838'}.elfinder .ui-icon-locked:before{content:'\e834'}.elfinder .ui-icon-unlocked:before{content:'\e836'}.elfinder .ui-icon-arrowrefresh-1-n:before{content:'\e821'}.elfinder .ui-icon-plusthick:before{content:'\e83a'}.elfinder .ui-icon-arrowreturnthick-1-s:before{content:'\e83b'}.elfinder .ui-icon-minusthick:before{content:'\e83c'}.elfinder .ui-icon-pin-s:before{content:'\e84d'}.elfinder .ui-icon-check:before{content:'\e84e'}.elfinder .ui-icon-arrowthick-1-s:before{content:'\e84f'}.elfinder .ui-icon-arrowthick-1-n:before{content:'\e850'}.elfinder .ui-icon-triangle-1-s:before{content:'\e851'}.elfinder .ui-icon-triangle-1-n:before{content:'\e852'}.elfinder .ui-icon-grip-dotted-vertical:before{content:'\e853'}.elfinder-lock,.elfinder-perms,.elfinder-symlink{background-image:inherit;font:normal normal normal 18px/1 material;color:#4d4d4d}.elfinder-na .elfinder-perms:before{content:'\e824'}.elfinder-ro .elfinder-perms:before{content:'\e835'}.elfinder-wo .elfinder-perms:before{content:'\e854'}.elfinder-group .elfinder-perms:before{content:'\e800'}.elfinder-lock:before{content:'\e84d'}.elfinder-symlink:before{content:'\e837'}.elfinder .elfinder-toast>div{font:normal normal normal 14px/1 material}.elfinder .elfinder-toast>div:before{font-size:45px;position:absolute;left:5px;top:15px}.elfinder .elfinder-toast>.toast-error,.elfinder .elfinder-toast>.toast-info,.elfinder .elfinder-toast>.toast-success,.elfinder .elfinder-toast>.toast-warning{background-image:inherit!important}.elfinder .elfinder-toast>.toast-info:before{content:'\e817';color:#3498db}.elfinder .elfinder-toast>.toast-error:before{content:'\e855';color:#f44336}.elfinder .elfinder-toast>.toast-success:before{content:'\e84e';color:#4caf50}.elfinder .elfinder-toast>.toast-warning:before{content:'\e856';color:#ff9800}.elfinder-drag-helper-icon-status{font:normal normal normal 14px/1 material;background:inherit}.elfinder-drag-helper-icon-status:before{content:'\e824'}.elfinder-drag-helper-move .elfinder-drag-helper-icon-status{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.elfinder-drag-helper-move .elfinder-drag-helper-icon-status:before{content:'\e854'}.elfinder-drag-helper-plus .elfinder-drag-helper-icon-status{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.elfinder-drag-helper-plus .elfinder-drag-helper-icon-status:before{content:'\e84c'}.elfinder-cwd-view-list td .elfinder-cwd-icon{background-image:url("../images/icons-small.svg")}.elfinder-cwd-icon{background:url("../images/icons-big.svg") 0 0 no-repeat;border-radius:0}.elfinder-cwd-icon:before{font-size:10px;position:relative;top:27px;left:inherit;padding:1px;background-color:transparent}.elfinder-cwd-icon-directory{background-position:0 -50px}.elfinder-cwd .elfinder-droppable-active .elfinder-cwd-icon{background-position:0 -100px}.elfinder-cwd-icon-group{background-position:0 -150px}.elfinder-cwd-icon-application{background-position:0 -200px}.elfinder-cwd-icon-rtf,.elfinder-cwd-icon-rtfd,.elfinder-cwd-icon-text{background-position:0 -250px}.elfinder-cwd-icon-image{background-position:0 -300px}.elfinder-cwd-icon-audio{background-position:0 -350px}.elfinder-cwd-icon-dash-xml,.elfinder-cwd-icon-flash-video,.elfinder-cwd-icon-video,.elfinder-cwd-icon-vnd-apple-mpegurl,.elfinder-cwd-icon-x-mpegurl{background-position:0 -400px}.elfinder-cwd-icon-plain,.elfinder-cwd-icon-x-empty{background-position:0 -450px}.elfinder-cwd-icon-pdf{background-position:0 -500px}.elfinder-cwd-icon-vnd-ms-office{background-position:0 -550px}.elfinder-cwd-icon-x-msaccess{background-position:0 -600px}.elfinder-cwd-icon-x-msaccess:before{content:none!important}.elfinder-cwd-icon-ms-excel,.elfinder-cwd-icon-vnd-ms-excel,.elfinder-cwd-icon-vnd-ms-excel-addin-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-sheet-binary-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-sheet-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-template-macroEnabled-12{background-position:0 -650px}.elfinder-cwd-icon-ms-excel:before,.elfinder-cwd-icon-vnd-ms-excel-addin-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-excel-sheet-binary-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-excel-sheet-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-excel-template-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-excel:before{content:none!important}.elfinder-cwd-icon-vnd-ms-powerpoint,.elfinder-cwd-icon-vnd-ms-powerpoint-addin-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-presentation-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-slide-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-slideshow-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-template-macroEnabled-12{background-position:0 -700px}.elfinder-cwd-icon-vnd-ms-powerpoint-addin-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-powerpoint-presentation-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-powerpoint-slide-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-powerpoint-slideshow-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-powerpoint-template-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-powerpoint:before{content:none!important}.elfinder-cwd-icon-msword,.elfinder-cwd-icon-vnd-ms-word,.elfinder-cwd-icon-vnd-ms-word-document-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-word-template-macroEnabled-12{background-position:0 -750px}.elfinder-cwd-icon-msword:before,.elfinder-cwd-icon-vnd-ms-word-document-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-word-template-macroEnabled-12:before,.elfinder-cwd-icon-vnd-ms-word:before{content:none!important}.elfinder-cwd-icon-vnd-oasis-opendocument-base,.elfinder-cwd-icon-vnd-oasis-opendocument-chart,.elfinder-cwd-icon-vnd-oasis-opendocument-database,.elfinder-cwd-icon-vnd-oasis-opendocument-formula,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics-template,.elfinder-cwd-icon-vnd-oasis-opendocument-image,.elfinder-cwd-icon-vnd-openofficeorg-extension{background-position:0 -800px}.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet,.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet-template,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-sheet,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-template{background-position:0 -850px}.elfinder-cwd-icon-vnd-oasis-opendocument-presentation,.elfinder-cwd-icon-vnd-oasis-opendocument-presentation-template,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-presentation,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slide,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slideshow,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-template{background-position:0 -900px}.elfinder-cwd-icon-vnd-oasis-opendocument-text,.elfinder-cwd-icon-vnd-oasis-opendocument-text-master,.elfinder-cwd-icon-vnd-oasis-opendocument-text-template,.elfinder-cwd-icon-vnd-oasis-opendocument-text-web,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-document,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-template{background-position:0 -950px}.elfinder-cwd-icon-x-7z-compressed,.elfinder-cwd-icon-x-bzip,.elfinder-cwd-icon-x-bzip2,.elfinder-cwd-icon-x-gzip,.elfinder-cwd-icon-x-rar,.elfinder-cwd-icon-x-rar-compressed,.elfinder-cwd-icon-x-tar,.elfinder-cwd-icon-x-xz,.elfinder-cwd-icon-x-zip,.elfinder-cwd-icon-zip{background-position:0 -1000px}.elfinder-cwd-icon-postscript{background-position:0 -1050px}.elfinder-cwd-icon-vnd-adobe-photoshop{background-position:0 -1100px}.elfinder-cwd-icon-vnd-adobe-photoshop:before{content:none!important}.elfinder-cwd-icon-x-shockwave-flash{background-position:0 -1150px}.elfinder-cwd-icon-vnd-android-package-archive{background-position:0 -1200px}.elfinder-cwd-icon-vnd-android-package-archive:before{content:none!important}.elfinder-cwd-icon-x-c,.elfinder-cwd-icon-x-c--,.elfinder-cwd-icon-x-c--hdr,.elfinder-cwd-icon-x-c--src,.elfinder-cwd-icon-x-chdr,.elfinder-cwd-icon-x-csrc{background-position:0 -1250px}.elfinder-cwd-icon-css{background-position:0 -1300px}.elfinder-cwd-icon-html{background-position:0 -1350px}.elfinder-cwd-icon-x-jar,.elfinder-cwd-icon-x-java,.elfinder-cwd-icon-x-java-source{background-position:0 -1400px}.elfinder-cwd-icon-x-jar:before,.elfinder-cwd-icon-x-java-source:before,.elfinder-cwd-icon-x-java:before{content:none!important}.elfinder-cwd-icon-javascript,.elfinder-cwd-icon-x-javascript{background-position:0 -1450px}.elfinder-cwd-icon-json{background-position:0 -1500px}.elfinder-cwd-icon-json:before{content:none!important}.elfinder-cwd-icon-markdown,.elfinder-cwd-icon-x-markdown{background-position:0 -1550px}.elfinder-cwd-icon-markdown:before,.elfinder-cwd-icon-x-markdown:before{content:none!important}.elfinder-cwd-icon-x-perl{background-position:0 -1600px}.elfinder-cwd-icon-x-php{background-position:0 -1650px}.elfinder-cwd-icon-x-python,.elfinder-cwd-icon-x-python:after{background-position:0 -1700px}.elfinder-cwd-icon-x-ruby{background-position:0 -1750px}.elfinder-cwd-icon-x-sh,.elfinder-cwd-icon-x-shellscript{background-position:0 -1800px}.elfinder-cwd-icon-sql,.elfinder-cwd-icon-x-sql,.elfinder-cwd-icon-x-sqlite3{background-position:0 -1850px}.elfinder-cwd-icon-svg,.elfinder-cwd-icon-svg-xml,.elfinder-cwd-icon-x-eps{background-position:0 -1900px}.elfinder-cwd-icon-xml,.elfinder-cwd-icon-xml:after{background-position:0 -1950px}.elfinder-cwd-icon-x-zip:before,.elfinder-cwd-icon-zip:before{content:'zip'!important}.elfinder-cwd-icon-x-xz:before{content:'xz'!important}.elfinder-cwd-icon-x-7z-compressed:before{content:'7z'!important}.elfinder-cwd-icon-x-gzip:before{content:'gzip'!important}.elfinder-cwd-icon-x-tar:before{content:'tar'!important}.elfinder-cwd-icon-x-bzip2:before,.elfinder-cwd-icon-x-bzip:before{content:'bzip'!important}.elfinder-cwd-icon-x-rar-compressed:before,.elfinder-cwd-icon-x-rar:before{content:'rar'!important}.elfinder-toolbar{background:#1E88E5;border-radius:0;border:0;padding:5px 0}.elfinder-toolbar .elfinder-button-icon{font-size:20px;color:#fff;margin-top:-2px}.elfinder-buttonset{border-radius:0;border:0;margin:0 5px;height:24px}.elfinder .elfinder-button{background:transparent;border-radius:0;cursor:pointer;color:#fff}.elfinder .elfinder-button-text{top:-3px;margin-left:6px}.elfinder-toolbar-button-separator{border:0}.elfinder-button-menu{border-radius:2px;box-shadow:0 1px 6px rgba(0,0,0,0.3);border:none;margin-top:5px}.elfinder-button-menu-item{color:#666;padding:6px 19px}.elfinder-button-menu-item.ui-state-hover{color:#141414;background-color:#f5f4f4}.elfinder-button-menu-item-separated{border-top:1px solid #e5e5e5}.elfinder-button-menu-item-separated.ui-state-hover{border-top:1px solid #e5e5e5}.elfinder .elfinder-button-search{margin:0 10px;min-height:inherit;overflow:hidden}.elfinder .elfinder-button-search .ui-icon{color:#fff!important}.elfinder .elfinder-button-search input{background:rgba(16,96,167,0.79);border-radius:2px;box-sizing:content-box;border:0;margin:0;padding:0 23px;height:24px!important;color:#fff}.elfinder .elfinder-button-search .elfinder-button-menu{margin-top:4px;border:none;box-shadow:0 1px 3px rgba(0,0,0,0.5)}.elfinder .elfinder-button-search-menu{border-radius:0;top:30px!important}.elfinder .elfinder-button-search-menu .ui-button{padding:0.4em 1em!important}.elfinder .elfinder-navbar{background:#f3f3f3;box-shadow:0 1px 8px rgba(0,0,0,0.6);border:none}.elfinder .elfinder-navbar .elfinder-lock,.elfinder .elfinder-navbar .elfinder-perms,.elfinder .elfinder-navbar .elfinder-symlink{color:#1d1d1d;opacity:0.8}.elfinder-navbar-dir{color:#525252;cursor:pointer;border-radius:2px;padding:5px;border:none}.elfinder-navbar-dir .elfinder-navbar-icon{color:#1976D2}.elfinder-navbar-dir.ui-state-active.ui-state-hover,.elfinder-navbar-dir.ui-state-hover{background:#1a83df;color:#fff;border:none}.elfinder-navbar-dir.ui-state-active.ui-state-hover .elfinder-navbar-icon,.elfinder-navbar-dir.ui-state-hover .elfinder-navbar-icon{color:#fff}.elfinder-disabled .elfinder-navbar .ui-state-active,.elfinder-navbar .ui-state-active{background:#1E88E5;color:#fff!important;border:none}.elfinder-disabled .elfinder-navbar .ui-state-active.elfinder-navbar-dir .elfinder-navbar-icon,.elfinder-navbar .ui-state-active.elfinder-navbar-dir .elfinder-navbar-icon{color:#fff!important}.elfinder-workzone{background:#fff}.elfinder-cwd-file{color:#555}.elfinder-cwd-file.ui-selected.ui-state-hover,.elfinder-cwd-file.ui-state-hover{background:#42A5F5;color:#ddd}.elfinder-cwd-file.ui-selected{background:#339ef4;color:#555}.elfinder-cwd-filename input,.elfinder-cwd-filename textarea{padding:2px;border-radius:2px!important;background:#fff;color:#222}.elfinder-cwd-filename input:focus,.elfinder-cwd-filename textarea:focus{outline:none;border:1px solid #555}.elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover,.elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-active,.elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover,.elfinder-disabled .elfinder-cwd table td.ui-state-hover,.elfinder-disabled .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover{background:transparent;color:#ddd}.elfinder-cwd table{padding:0}.elfinder-cwd table thead td{padding:5px 14px!important}.elfinder-cwd table tr{border:0!important}.elfinder-cwd table tr.ui-state-default,.elfinder-cwd table tr.ui-widget-content .ui-state-default{background:none}.elfinder-cwd table tr .ui-state-hover{background:#42A5F5;color:#ddd}.elfinder-cwd.elfinder-table-header-sticky table{border:0}.elfinder-cwd .elfinder-lock,.elfinder-cwd .elfinder-perms,.elfinder-cwd .elfinder-symlink{color:#4d4d4d}.elfinder-cwd-view-icons .elfinder-lock{top:0}.elfinder-cwd-view-list thead td .ui-resizable-handle{top:3px}.elfinder-cwd-view-list .elfinder-lock,.elfinder-cwd-view-list .elfinder-perms,.elfinder-cwd-view-list .elfinder-symlink{font-size:14px;opacity:0.7}.elfinder-cwd-view-list .elfinder-perms{left:inherit}#elfinder-elfinder-cwd-thead td,.elfinder-cwd-wrapper-empty .elfinder-cwd-view-list td{background:#1976D2;color:#fff!important;height:18px}#elfinder-elfinder-cwd-thead td.ui-state-active,#elfinder-elfinder-cwd-thead td.ui-state-hover,.elfinder-cwd-wrapper-empty .elfinder-cwd-view-list td.ui-state-active,.elfinder-cwd-wrapper-empty .elfinder-cwd-view-list td.ui-state-hover{background:#1669bb!important}#elfinder-elfinder-cwd-thead td.ui-state-active.ui-state-hover,.elfinder-cwd-wrapper-empty .elfinder-cwd-view-list td.ui-state-active.ui-state-hover{background:#176ec4!important}.elfinder .ui-selectable-helper{border:1px solid #2196F3;background-color:rgba(33,138,232,0.5)}.elfinder-cwd-wrapper.elfinder-cwd-wrapper-trash{background-color:#eee}.elfinder-cwd-wrapper.elfinder-cwd-wrapper-trash .elfinder-cwd-file{color:#333}.elfinder-cwd-wrapper.elfinder-cwd-wrapper-trash .elfinder-cwd-file.ui-selected.ui-state-hover,.elfinder-cwd-wrapper.elfinder-cwd-wrapper-trash .elfinder-cwd-file.ui-state-hover{background:#42A5F5;color:#ddd}.elfinder-cwd-wrapper.elfinder-cwd-wrapper-trash .elfinder-cwd-file.ui-selected{background:#339ef4;color:#555}.elfinder-info-title .elfinder-cwd-icon:before{top:32px;display:block;margin:0 auto}.elfinder-info-title .elfinder-cwd-icon.elfinder-cwd-bgurl:before{background-color:#313131!important}.elfinder-cwd-view-icons .elfinder-cwd-icon.elfinder-cwd-bgurl:before{left:inherit;background-color:#313131}.elfinder-cwd-icon:before,.elfinder-cwd-size1 .elfinder-cwd-icon.elfinder-cwd-bgurl:before,.elfinder-cwd-size1 .elfinder-cwd-icon:before,.elfinder-cwd-size2 .elfinder-cwd-icon.elfinder-cwd-bgurl:before,.elfinder-cwd-size2 .elfinder-cwd-icon:before,.elfinder-cwd-size3 .elfinder-cwd-icon.elfinder-cwd-bgurl:before,.elfinder-cwd-size3 .elfinder-cwd-icon:before,.elfinder-quicklook .elfinder-cwd-icon:before{top:35px;left:50%!important;position:relative!important;display:block!important;-webkit-transform:translateX(-50%);transform:translateX(-50%);max-width:52px;color:#fff}.elfinder .elfinder-cwd-view-icons .elfinder-cwd-bgurl:after,.elfinder .elfinder-quicklook-info-wrapper .elfinder-cwd-bgurl:after{display:none}.elfinder-cwd-size1 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{top:53px;-webkit-transform:scale(1.32) translateX(-50%);transform:scale(1.32) translateX(-50%)}.elfinder-cwd-size2 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{top:74px;-webkit-transform:scale(1.53) translateX(-50%);transform:scale(1.53) translateX(-50%)}.elfinder-cwd-size3 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{top:87px;-webkit-transform:scale(2.22) translateX(-50%);transform:scale(2.22) translateX(-50%)}.elfinder .elfinder-statusbar{background:#2196F3;border-radius:0;border:0;color:#fff;padding-top:5px}.elfinder-path,.elfinder-stat-size{margin:0 15px}.elfinder input,.elfinder select{padding:4px;color:#666;background:#fff;border-radius:3px;font-weight:normal;border-color:#888;box-shadow:none!important}.elfinder input.ui-state-hover,.elfinder select.ui-state-hover{background:#fff!important;color:#666!important}.elfinder input[type=checkbox]{position:relative;height:initial}.elfinder input[type=checkbox]:after,.elfinder input[type=checkbox]:focus:after{content:"";display:block;width:12px;height:12px;border:1px solid #707070;background-color:#fff;border-radius:2px}.elfinder input[type=checkbox]:checked:before{content:"";position:absolute;top:-3px;left:6px;display:table;width:4px;height:12px;border:2px solid #707070;border-top-width:0;border-left-width:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.elfinder .ui-button,.elfinder .ui-button.ui-state-default,.elfinder .ui-button:active{display:inline-block;font-weight:normal;text-align:center;vertical-align:middle;cursor:pointer;white-space:nowrap;border-radius:3px;text-transform:uppercase;box-shadow:1px 1px 4px rgba(0,0,0,0.4)!important;transition:all 0.4s;background:#fff;color:#222;border:none;padding:7px 6px}.elfinder .ui-button .ui-icon,.elfinder .ui-button.ui-state-default .ui-icon,.elfinder .ui-button:active .ui-icon{color:#222}.elfinder .ui-button.ui-state-active,.elfinder .ui-button.ui-state-hover,.elfinder .ui-button:active,.elfinder .ui-button:focus,.elfinder .ui-button:hover,.elfinder a.ui-button:active{background:#3498db!important;color:#fff!important;border:none}.elfinder .ui-button.ui-state-active .ui-icon,.elfinder .ui-button.ui-state-hover .ui-icon,.elfinder .ui-button:active .ui-icon,.elfinder .ui-button:focus .ui-icon,.elfinder .ui-button:hover .ui-icon,.elfinder a.ui-button:active .ui-icon{color:#fff}.elfinder .ui-button.ui-state-active:hover{background:#217dbb;color:#fff;border:none}.elfinder .ui-button:focus{outline:none!important}.elfinder .ui-controlgroup-horizontal .ui-button{border-radius:0;border:0}.elfinder .elfinder-resize-preset-container .ui-button,.elfinder input:not([type=checkbox]){height:21px}.elfinder .elfinder-contextmenu,.elfinder .elfinder-contextmenu-sub{border-radius:2px;box-shadow:0 1px 6px rgba(0,0,0,0.3);border:none}.elfinder .elfinder-contextmenu-separator,.elfinder .elfinder-contextmenu-sub-separator{border-top:1px solid #e5e5e5}.elfinder .elfinder-contextmenu-item{color:#666;padding:5px 30px}.elfinder .elfinder-contextmenu-item.ui-state-hover{background-color:#f5f4f4;color:#141414}.elfinder .elfinder-contextmenu-item.ui-state-active{background-color:#2196f3;color:#fff}.elfinder .elfinder-dialog{border-radius:0;border:0;box-shadow:0 1px 30px rgba(0,0,0,0.6)}.elfinder .elfinder-dialog .ui-dialog-content[id*=edit-elfinder-elfinder-]{padding:0}.elfinder .elfinder-dialog .ui-tabs{border-radius:0;border:0;padding:0}.elfinder .elfinder-dialog .ui-tabs-nav{border-radius:0;border:0;background:transparent;border-bottom:1px solid #ddd}.elfinder .elfinder-dialog .ui-tabs-nav li{border:0;font-weight:normal;background:transparent;margin:0;padding:0}.elfinder .elfinder-dialog .ui-tabs-nav li a{padding:7px 9px}.elfinder .elfinder-dialog .ui-tabs-nav .ui-state-active a,.elfinder .elfinder-dialog .ui-tabs-nav .ui-tabs-selected a,.elfinder .elfinder-dialog .ui-tabs-nav li:hover a{box-shadow:inset 0 -2px 0 #3498db;color:#3498db}.elfinder .elfinder-dialog .ui-tabs .elfinder-tabstop.ui-state-hover{background:transparent;box-shadow:inset 0 -2px 0 #3498db;color:#3498db}.elfinder .elfinder-dialog label.ui-state-hover{background:transparent}.elfinder .elfinder-dialog .ui-resizable-se{display:none}.std42-dialog .ui-dialog-titlebar{background:#1565C0;border-radius:0;border:0}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button .ui-icon{border-color:inherit;transition:0.2s ease-out;opacity:0.8;color:#fff;width:auto;height:auto;font-size:12px;padding:3px}.std42-dialog,.std42-dialog .ui-dialog-content,.std42-dialog.elfinder-bg-translucent,.std42-dialog.elfinder-bg-translucent .ui-widget-content{background-color:#fff}.std42-dialog .ui-dialog-buttonpane button{margin:-1px 2px 2px;padding:7px 6px}.std42-dialog .ui-dialog-buttonpane button span.ui-icon{padding:0}.std42-dialog .ui-dialog-buttonpane .ui-dialog-buttonset.elfinder-edit-extras select{margin-top:0}.std42-dialog,.std42-dialog .ui-widget-content{background-color:#fff}.elfinder-mobile .std42-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close .ui-icon,.std42-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:hover .ui-icon{background-color:#f44336}.elfinder-mobile .std42-dialog .ui-dialog-titlebar .elfinder-titlebar-full .ui-icon,.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-full:hover .ui-icon{background-color:#4caf50}.elfinder-mobile .std42-dialog .ui-dialog-titlebar .elfinder-titlebar-minimize .ui-icon,.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-minimize:hover .ui-icon{background-color:#ff9800}.elfinder-dialog-title{color:#f1f1f1}.elfinder .ui-widget-content{font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif;color:#546e7a}.elfinder-upload-dialog-wrapper .elfinder-upload-dirselect{width:inherit;height:inherit;padding:7px;margin-left:5px;color:#222;box-shadow:1px 1px 4px rgba(0,0,0,0.4);background:#fff;bottom:4px;border-radius:2px}.elfinder-upload-dialog-wrapper .elfinder-upload-dirselect.ui-state-hover{background:#3498db!important;color:#fff!important;outline:none}.elfinder-upload-dialog-wrapper .ui-button{padding:0.4em 3px;margin:0 -15px 0 19px}.elfinder-upload-dropbox{border:2px dashed #bbb}.elfinder-upload-dropbox:focus{outline:none}.elfinder-upload-dropbox.ui-state-hover{background:#f1f1f1;border:2px dashed #bbb}.elfinder-dialog-resize .elfinder-resize-control-panel{margin-left:-5px}.elfinder-dialog-resize .elfinder-resize-control-panel .ui-button{height:inherit;margin-bottom:5px}.elfinder-help *{color:#546e7a}.elfinder-help a{color:#3498db}.elfinder-help a:hover{color:#217dbb}.elfinder .ui-slider.ui-slider-horizontal{height:2px;border:0;background-color:#bababa!important}.elfinder .ui-slider .ui-slider-handle{background-image:none;background-color:#5d5858;border-radius:50%;border:0;margin-top:-3px}.elfinder .ui-slider .ui-slider-handle.ui-state-hover{background:#5d5858!important;box-shadow:none!important;border-radius:50%;cursor:pointer}.elfinder-quicklook{background:#232323;border-radius:2px}.elfinder-quicklook-navbar{height:27px}.elfinder-quicklook-titlebar{background:inherit}.elfinder-quicklook-titlebar-icon,.elfinder-quicklook-titlebar-icon .ui-icon{background:transparent;color:#fff}.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar{border:inherit;opacity:inherit;border-radius:4px;background:rgba(66,66,66,0.73)}.elfinder .elfinder-navdock{border:0}.elfinder-mobile .elfinder-quicklook-titlebar-icon .ui-icon.elfinder-icon-close,.elfinder-mobile .elfinder-quicklook-titlebar-icon .ui-icon.elfinder-icon-full,.elfinder-mobile .elfinder-quicklook-titlebar-icon .ui-icon.elfinder-icon-minimize,.elfinder-mobile .std42-dialog .ui-dialog-titlebar .elfinder-titlebar-full .ui-icon,.elfinder-mobile .std42-dialog .ui-dialog-titlebar .elfinder-titlebar-minimize .ui-icon,.elfinder-mobile .std42-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close .ui-icon,.elfinder-quicklook-titlebar-icon .ui-icon.elfinder-icon-close:hover,.elfinder-quicklook-titlebar-icon .ui-icon.elfinder-icon-full:hover,.elfinder-quicklook-titlebar-icon .ui-icon.elfinder-icon-minimize:hover,.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-full:hover .ui-icon,.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-minimize:hover .ui-icon,.std42-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:hover .ui-icon{background-image:none}